From 9fecdaeec3ebe177e3407562d4f9aa38cd97fbfe Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 10 Aug 2018 11:41:22 -0700 Subject: [PATCH] Generated from 7c45eb3279357ea5737721ea844d03f0739e9cef (#2303) Changes to support Azure Disk Encryption & Accelerated Networking --- .../resource-manager/v2018_01_10/pom.xml | 133 + .../A2AApplyRecoveryPointInput.java | 20 + .../A2AContainerCreationInput.java | 20 + .../v2018_01_10/A2AEnableProtectionInput.java | 204 + .../v2018_01_10/A2AEventDetails.java | 177 + .../v2018_01_10/A2AFailoverProviderInput.java | 74 + .../v2018_01_10/A2APolicyCreationInput.java | 128 + .../v2018_01_10/A2APolicyDetails.java | 152 + .../v2018_01_10/A2AProtectedDiskDetails.java | 357 ++ .../A2AProtectedManagedDiskDetails.java | 331 ++ .../v2018_01_10/A2AReplicationDetails.java | 784 +++ .../v2018_01_10/A2AReprotectInput.java | 178 + .../v2018_01_10/A2ARpRecoveryPointType.java | 59 + .../v2018_01_10/A2ASwitchProtectionInput.java | 204 + ...2AUpdateReplicationProtectedItemInput.java | 73 + .../v2018_01_10/A2AVmDiskInputDetails.java | 95 + .../A2AVmManagedDiskInputDetails.java | 95 + .../v2018_01_10/ARMException.java | 148 + .../v2018_01_10/ARMExceptionDetails.java | 199 + .../v2018_01_10/ARMInnerError.java | 407 ++ .../v2018_01_10/ASRTask.java | 335 ++ .../v2018_01_10/AddVCenterRequest.java | 43 + .../AddVCenterRequestProperties.java | 147 + .../v2018_01_10/Alert.java | 95 + .../v2018_01_10/AlertProperties.java | 96 + .../AlternateLocationRecoveryOption.java | 53 + .../v2018_01_10/ApplyRecoveryPointInput.java | 43 + .../ApplyRecoveryPointInputProperties.java | 69 + ...plyRecoveryPointProviderSpecificInput.java | 26 + .../v2018_01_10/AsrJobDetails.java | 20 + .../AutomationRunbookTaskDetails.java | 255 + .../v2018_01_10/AzureFabricCreationInput.java | 47 + .../AzureFabricSpecificDetails.java | 74 + ...AzureToAzureCreateNetworkMappingInput.java | 48 + .../AzureToAzureNetworkMappingSettings.java | 73 + ...AzureToAzureUpdateNetworkMappingInput.java | 47 + .../AzureToAzureVmSyncedConfigDetails.java | 97 + .../v2018_01_10/AzureVmDiskDetails.java | 199 + .../v2018_01_10/ConfigurationSettings.java | 26 + .../v2018_01_10/ConfigureAlertRequest.java | 43 + .../ConfigureAlertRequestProperties.java | 96 + .../ConsistencyCheckTaskDetails.java | 49 + .../CreateNetworkMappingInput.java | 43 + .../CreateNetworkMappingInputProperties.java | 95 + .../v2018_01_10/CreatePolicyInput.java | 43 + .../CreatePolicyInputProperties.java | 43 + .../CreateProtectionContainerInput.java | 43 + ...ateProtectionContainerInputProperties.java | 44 + ...CreateProtectionContainerMappingInput.java | 43 + ...ectionContainerMappingInputProperties.java | 95 + .../v2018_01_10/CreateRecoveryPlanInput.java | 43 + .../CreateRecoveryPlanInputProperties.java | 123 + .../v2018_01_10/CurrentScenarioDetails.java | 96 + .../v2018_01_10/DataStore.java | 147 + .../v2018_01_10/DataSyncStatus.java | 53 + .../v2018_01_10/DisableProtectionInput.java | 43 + .../DisableProtectionInputProperties.java | 71 + ...isableProtectionProviderSpecificInput.java | 24 + .../v2018_01_10/DisableProtectionReason.java | 53 + .../DiscoverProtectableItemRequest.java | 43 + ...coverProtectableItemRequestProperties.java | 95 + .../v2018_01_10/DiskDetails.java | 121 + .../v2018_01_10/DiskVolumeDetails.java | 69 + .../v2018_01_10/Display.java | 144 + .../v2018_01_10/EnableProtectionInput.java | 43 + .../EnableProtectionInputProperties.java | 98 + ...EnableProtectionProviderSpecificInput.java | 28 + .../v2018_01_10/EncryptionDetails.java | 96 + .../v2018_01_10/Event.java | 47 + .../v2018_01_10/EventProperties.java | 282 + .../EventProviderSpecificDetails.java | 29 + .../v2018_01_10/EventQueryParameter.java | 202 + .../v2018_01_10/EventSpecificDetails.java | 24 + .../v2018_01_10/ExportJobDetails.java | 73 + .../v2018_01_10/Fabric.java | 95 + .../v2018_01_10/FabricCreationInput.java | 43 + .../FabricCreationInputProperties.java | 43 + .../v2018_01_10/FabricProperties.java | 226 + .../FabricReplicationGroupTaskDetails.java | 99 + ...bricSpecificCreateNetworkMappingInput.java | 26 + .../FabricSpecificCreationInput.java | 25 + .../v2018_01_10/FabricSpecificDetails.java | 28 + ...bricSpecificUpdateNetworkMappingInput.java | 26 + .../v2018_01_10/FailoverDeploymentModel.java | 56 + .../v2018_01_10/FailoverJobDetails.java | 48 + .../FailoverProcessServerRequest.java | 43 + ...ailoverProcessServerRequestProperties.java | 148 + ...iloverReplicationProtectedItemDetails.java | 252 + .../v2018_01_10/GroupTaskDetails.java | 55 + .../v2018_01_10/HealthError.java | 305 + .../v2018_01_10/HealthErrorCategory.java | 56 + .../v2018_01_10/HealthErrorSummary.java | 205 + .../HyperVReplica2012EventDetails.java | 125 + .../HyperVReplica2012R2EventDetails.java | 125 + ...rVReplicaAzureApplyRecoveryPointInput.java | 99 + ...perVReplicaAzureEnableProtectionInput.java | 389 ++ .../HyperVReplicaAzureEventDetails.java | 99 + ...perVReplicaAzureFailbackProviderInput.java | 99 + ...perVReplicaAzureFailoverProviderInput.java | 126 + .../HyperVReplicaAzurePolicyDetails.java | 181 + .../HyperVReplicaAzurePolicyInput.java | 183 + .../HyperVReplicaAzureReplicationDetails.java | 572 ++ .../HyperVReplicaAzureReprotectInput.java | 177 + ...HyperVReplicaAzureRpRecoveryPointType.java | 56 + ...reUpdateReplicationProtectedItemInput.java | 99 + .../HyperVReplicaBaseEventDetails.java | 125 + .../HyperVReplicaBasePolicyDetails.java | 282 + .../HyperVReplicaBaseReplicationDetails.java | 205 + .../HyperVReplicaBluePolicyDetails.java | 308 + .../HyperVReplicaBluePolicyInput.java | 307 + .../HyperVReplicaBlueReplicationDetails.java | 205 + .../HyperVReplicaPolicyDetails.java | 282 + .../v2018_01_10/HyperVReplicaPolicyInput.java | 281 + .../HyperVReplicaReplicationDetails.java | 205 + .../v2018_01_10/HyperVSiteDetails.java | 20 + .../HyperVVirtualMachineDetails.java | 126 + .../v2018_01_10/IdentityInformation.java | 210 + .../v2018_01_10/IdentityProviderType.java | 53 + .../v2018_01_10/InMageAgentDetails.java | 95 + .../InMageAzureV2ApplyRecoveryPointInput.java | 47 + .../InMageAzureV2EnableProtectionInput.java | 415 ++ .../InMageAzureV2EventDetails.java | 204 + .../InMageAzureV2FailoverProviderInput.java | 74 + .../InMageAzureV2PolicyDetails.java | 152 + .../v2018_01_10/InMageAzureV2PolicyInput.java | 154 + .../InMageAzureV2ProtectedDiskDetails.java | 408 ++ .../InMageAzureV2RecoveryPointDetails.java | 58 + .../InMageAzureV2ReplicationDetails.java | 1254 ++++ .../InMageAzureV2ReprotectInput.java | 204 + ...V2UpdateReplicationProtectedItemInput.java | 99 + .../v2018_01_10/InMageBasePolicyDetails.java | 126 + ...isableProtectionProviderSpecificInput.java | 48 + .../v2018_01_10/InMageDiskDetails.java | 174 + .../v2018_01_10/InMageDiskExclusionInput.java | 71 + .../InMageDiskSignatureExclusionOptions.java | 44 + .../InMageEnableProtectionInput.java | 282 + .../InMageFailoverProviderInput.java | 77 + .../v2018_01_10/InMagePolicyDetails.java | 126 + .../v2018_01_10/InMagePolicyInput.java | 128 + .../InMageProtectedDiskDetails.java | 408 ++ .../v2018_01_10/InMageReplicationDetails.java | 992 ++++ .../v2018_01_10/InMageReprotectInput.java | 230 + .../InMageV2RpRecoveryPointType.java | 59 + .../InMageVolumeExclusionOptions.java | 74 + .../v2018_01_10/InconsistentVmDetails.java | 124 + .../InitialReplicationDetails.java | 69 + .../InlineWorkflowTaskDetails.java | 48 + .../v2018_01_10/InputEndpoint.java | 121 + .../v2018_01_10/Job.java | 67 + .../v2018_01_10/JobDetails.java | 57 + .../v2018_01_10/JobEntity.java | 174 + .../v2018_01_10/JobErrorDetails.java | 148 + .../v2018_01_10/JobProperties.java | 387 ++ .../v2018_01_10/JobQueryParameter.java | 148 + .../v2018_01_10/JobStatusEventDetails.java | 125 + .../v2018_01_10/JobTaskDetails.java | 48 + .../v2018_01_10/LicenseType.java | 56 + .../v2018_01_10/LogicalNetwork.java | 47 + .../v2018_01_10/LogicalNetworkProperties.java | 123 + .../v2018_01_10/ManualActionTaskDetails.java | 99 + .../v2018_01_10/MasterTargetServer.java | 331 ++ .../v2018_01_10/MethodCallStatus.java | 96 + .../v2018_01_10/MobilityServiceUpdate.java | 95 + .../v2018_01_10/MultiVmSyncStatus.java | 53 + .../v2018_01_10/Network.java | 45 + .../v2018_01_10/NetworkMapping.java | 94 + .../NetworkMappingFabricSpecificSettings.java | 26 + .../v2018_01_10/NetworkMappingProperties.java | 251 + .../v2018_01_10/NetworkProperties.java | 122 + .../v2018_01_10/OSDetails.java | 173 + .../v2018_01_10/OSDiskDetails.java | 95 + .../v2018_01_10/Operations.java | 19 + .../v2018_01_10/OperationsDiscovery.java | 40 + .../v2018_01_10/PlannedFailoverInput.java | 43 + .../PlannedFailoverInputProperties.java | 69 + .../v2018_01_10/Policy.java | 95 + .../v2018_01_10/PolicyProperties.java | 69 + .../PolicyProviderSpecificDetails.java | 33 + .../PolicyProviderSpecificInput.java | 30 + .../PossibleOperationsDirections.java | 53 + .../v2018_01_10/ProcessServer.java | 671 +++ .../v2018_01_10/ProtectableItem.java | 47 + .../ProtectableItemProperties.java | 200 + .../ProtectedItemsQueryParameter.java | 95 + .../v2018_01_10/ProtectionContainer.java | 95 + ...tectionContainerFabricSpecificDetails.java | 32 + .../ProtectionContainerMapping.java | 95 + .../ProtectionContainerMappingProperties.java | 304 + ...ntainerMappingProviderSpecificDetails.java | 32 + .../ProtectionContainerProperties.java | 199 + .../v2018_01_10/ProviderError.java | 147 + .../ProviderSpecificFailoverInput.java | 28 + .../ProviderSpecificRecoveryPointDetails.java | 32 + .../RcmAzureMigrationPolicyDetails.java | 153 + .../v2018_01_10/RecoveryPlan.java | 106 + .../RecoveryPlanA2AFailoverInput.java | 75 + .../v2018_01_10/RecoveryPlanAction.java | 122 + .../RecoveryPlanActionDetails.java | 26 + .../RecoveryPlanActionLocation.java | 53 + ...eryPlanAutomationRunbookActionDetails.java | 99 + .../v2018_01_10/RecoveryPlanGroup.java | 122 + .../RecoveryPlanGroupTaskDetails.java | 99 + .../v2018_01_10/RecoveryPlanGroupType.java | 56 + ...ryPlanHyperVReplicaAzureFailbackInput.java | 75 + ...ryPlanHyperVReplicaAzureFailoverInput.java | 126 + ...ecoveryPlanInMageAzureV2FailoverInput.java | 102 + .../RecoveryPlanInMageFailoverInput.java | 48 + .../RecoveryPlanManualActionDetails.java | 47 + .../RecoveryPlanPlannedFailoverInput.java | 43 + ...eryPlanPlannedFailoverInputProperties.java | 71 + .../v2018_01_10/RecoveryPlanProperties.java | 409 ++ .../RecoveryPlanProtectedItem.java | 69 + ...veryPlanProviderSpecificFailoverInput.java | 28 + .../RecoveryPlanScriptActionDetails.java | 99 + .../RecoveryPlanShutdownGroupTaskDetails.java | 99 + .../RecoveryPlanTestFailoverCleanupInput.java | 43 + ...lanTestFailoverCleanupInputProperties.java | 43 + .../RecoveryPlanTestFailoverInput.java | 43 + ...coveryPlanTestFailoverInputProperties.java | 149 + .../RecoveryPlanUnplannedFailoverInput.java | 43 + ...yPlanUnplannedFailoverInputProperties.java | 98 + .../v2018_01_10/RecoveryPoint.java | 47 + .../v2018_01_10/RecoveryPointProperties.java | 96 + .../v2018_01_10/RecoveryPointType.java | 56 + .../v2018_01_10/RecoveryPoints.java | 44 + .../v2018_01_10/RecoveryServicesProvider.java | 47 + .../RecoveryServicesProviderProperties.java | 383 ++ ...RemoveProtectionContainerMappingInput.java | 43 + ...ectionContainerMappingInputProperties.java | 43 + .../v2018_01_10/RenewCertificateInput.java | 43 + .../RenewCertificateInputProperties.java | 43 + .../v2018_01_10/ReplicationAlertSettings.java | 39 + .../v2018_01_10/ReplicationEvents.java | 38 + .../v2018_01_10/ReplicationFabrics.java | 100 + .../v2018_01_10/ReplicationGroupDetails.java | 20 + .../v2018_01_10/ReplicationJobs.java | 78 + .../ReplicationLogicalNetworks.java | 40 + .../ReplicationNetworkMappings.java | 65 + .../v2018_01_10/ReplicationNetworks.java | 49 + .../v2018_01_10/ReplicationPolicies.java | 50 + .../ReplicationProtectableItems.java | 42 + .../v2018_01_10/ReplicationProtectedItem.java | 95 + .../ReplicationProtectedItemOperation.java | 86 + .../ReplicationProtectedItemProperties.java | 724 +++ .../ReplicationProtectedItems.java | 186 + ...eplicationProtectionContainerMappings.java | 77 + .../ReplicationProtectionContainers.java | 84 + ...cationProviderContainerUnmappingInput.java | 43 + ...roviderSpecificContainerCreationInput.java | 24 + ...ProviderSpecificContainerMappingInput.java | 43 + .../ReplicationProviderSpecificSettings.java | 30 + .../v2018_01_10/ReplicationRecoveryPlans.java | 114 + .../ReplicationRecoveryServicesProviders.java | 83 + ...licationStorageClassificationMappings.java | 65 + .../ReplicationStorageClassifications.java | 49 + .../v2018_01_10/ReplicationVaultHealths.java | 28 + .../v2018_01_10/ReplicationvCenters.java | 62 + .../v2018_01_10/ResourceHealthSummary.java | 72 + .../v2018_01_10/ResumeJobParams.java | 43 + .../ResumeJobParamsProperties.java | 43 + .../v2018_01_10/RetentionVolume.java | 121 + .../v2018_01_10/ReverseReplicationInput.java | 43 + .../ReverseReplicationInputProperties.java | 69 + ...verseReplicationProviderSpecificInput.java | 27 + .../v2018_01_10/RoleAssignment.java | 147 + .../RpInMageRecoveryPointType.java | 56 + .../v2018_01_10/RunAsAccount.java | 69 + .../v2018_01_10/SanEnableProtectionInput.java | 20 + .../v2018_01_10/ScriptActionTaskDetails.java | 125 + .../v2018_01_10/ServiceError.java | 147 + .../v2018_01_10/SetMultiVmSyncStatus.java | 53 + .../v2018_01_10/Severity.java | 59 + .../v2018_01_10/SourceSiteOperations.java | 53 + .../v2018_01_10/StorageClassification.java | 47 + .../StorageClassificationMapping.java | 95 + .../StorageClassificationMappingInput.java | 43 + ...torageClassificationMappingProperties.java | 43 + .../StorageClassificationProperties.java | 43 + .../StorageMappingInputProperties.java | 43 + .../v2018_01_10/Subnet.java | 96 + .../v2018_01_10/SwitchProtectionInput.java | 43 + .../SwitchProtectionInputProperties.java | 69 + .../SwitchProtectionJobDetails.java | 47 + ...SwitchProtectionProviderSpecificInput.java | 24 + .../v2018_01_10/TaskTypeDetails.java | 31 + .../v2018_01_10/TestFailoverCleanupInput.java | 43 + .../TestFailoverCleanupInputProperties.java | 43 + .../v2018_01_10/TestFailoverInput.java | 43 + .../TestFailoverInputProperties.java | 147 + .../v2018_01_10/TestFailoverJobDetails.java | 178 + .../v2018_01_10/UnplannedFailoverInput.java | 43 + .../UnplannedFailoverInputProperties.java | 95 + .../UpdateMobilityServiceRequest.java | 43 + ...pdateMobilityServiceRequestProperties.java | 43 + .../UpdateNetworkMappingInput.java | 43 + .../UpdateNetworkMappingInputProperties.java | 95 + .../v2018_01_10/UpdatePolicyInput.java | 43 + .../UpdatePolicyInputProperties.java | 43 + .../v2018_01_10/UpdateRecoveryPlanInput.java | 43 + .../UpdateRecoveryPlanInputProperties.java | 44 + .../UpdateReplicationProtectedItemInput.java | 43 + ...plicationProtectedItemInputProperties.java | 228 + ...ReplicationProtectedItemProviderInput.java | 26 + .../v2018_01_10/UpdateVCenterRequest.java | 43 + .../UpdateVCenterRequestProperties.java | 147 + .../v2018_01_10/VCenter.java | 95 + .../v2018_01_10/VCenterProperties.java | 278 + .../v2018_01_10/VMNicDetails.java | 329 ++ .../v2018_01_10/VMNicInputDetails.java | 121 + .../VMwareCbtPolicyCreationInput.java | 100 + .../v2018_01_10/VMwareDetails.java | 803 +++ .../VMwareV2FabricCreationInput.java | 20 + .../VMwareV2FabricSpecificDetails.java | 73 + .../VMwareVirtualMachineDetails.java | 284 + .../v2018_01_10/VaultHealthDetails.java | 45 + .../v2018_01_10/VaultHealthProperties.java | 96 + .../VirtualMachineTaskDetails.java | 99 + .../v2018_01_10/VmNicUpdatesTaskDetails.java | 99 + .../v2018_01_10/VmmDetails.java | 20 + .../VmmToAzureCreateNetworkMappingInput.java | 21 + .../VmmToAzureNetworkMappingSettings.java | 20 + .../VmmToAzureUpdateNetworkMappingInput.java | 20 + .../VmmToVmmCreateNetworkMappingInput.java | 21 + .../VmmToVmmNetworkMappingSettings.java | 20 + .../VmmToVmmUpdateNetworkMappingInput.java | 20 + .../v2018_01_10/VmwareCbtPolicyDetails.java | 126 + .../v2018_01_10/implementation/AlertImpl.java | 99 + .../implementation/AlertInner.java | 71 + .../v2018_01_10/implementation/EventImpl.java | 64 + .../implementation/EventInner.java | 71 + .../implementation/FabricImpl.java | 99 + .../implementation/FabricInner.java | 71 + .../implementation/IdParsingUtils.java | 57 + .../v2018_01_10/implementation/JobImpl.java | 85 + .../v2018_01_10/implementation/JobInner.java | 178 + .../implementation/LogicalNetworkImpl.java | 66 + .../implementation/LogicalNetworkInner.java | 71 + .../implementation/NetworkImpl.java | 56 + .../implementation/NetworkInner.java | 71 + .../implementation/NetworkMappingImpl.java | 105 + .../implementation/NetworkMappingInner.java | 76 + .../OperationsDiscoveryImpl.java | 52 + .../OperationsDiscoveryInner.java | 142 + .../implementation/OperationsImpl.java | 68 + .../implementation/OperationsInner.java | 300 + .../v2018_01_10/implementation/PageImpl.java | 75 + .../implementation/PolicyImpl.java | 99 + .../implementation/PolicyInner.java | 71 + .../implementation/ProtectableItemImpl.java | 68 + .../implementation/ProtectableItemInner.java | 71 + .../ProtectionContainerImpl.java | 102 + .../ProtectionContainerInner.java | 71 + .../ProtectionContainerMappingImpl.java | 105 + .../ProtectionContainerMappingInner.java | 71 + .../implementation/RecoveryPlanImpl.java | 128 + .../implementation/RecoveryPlanInner.java | 71 + .../implementation/RecoveryPointImpl.java | 70 + .../implementation/RecoveryPointInner.java | 71 + .../implementation/RecoveryPointsImpl.java | 65 + .../implementation/RecoveryPointsInner.java | 442 ++ .../RecoveryServicesManager.java | 327 ++ .../RecoveryServicesProviderImpl.java | 66 + .../RecoveryServicesProviderInner.java | 71 + .../ReplicationAlertSettingsImpl.java | 74 + .../ReplicationAlertSettingsInner.java | 587 ++ .../implementation/ReplicationEventsImpl.java | 65 + .../ReplicationEventsInner.java | 514 ++ .../ReplicationFabricsImpl.java | 129 + .../ReplicationFabricsInner.java | 2111 +++++++ .../implementation/ReplicationJobsImpl.java | 114 + .../implementation/ReplicationJobsInner.java | 1375 +++++ .../ReplicationLogicalNetworksImpl.java | 65 + .../ReplicationLogicalNetworksInner.java | 412 ++ .../ReplicationNetworkMappingsImpl.java | 99 + .../ReplicationNetworkMappingsInner.java | 1672 ++++++ .../ReplicationNetworksImpl.java | 83 + .../ReplicationNetworksInner.java | 654 +++ .../ReplicationPoliciesImpl.java | 81 + .../ReplicationPoliciesInner.java | 1260 ++++ .../ReplicationProtectableItemsImpl.java | 65 + .../ReplicationProtectableItemsInner.java | 427 ++ .../ReplicationProtectedItemImpl.java | 105 + .../ReplicationProtectedItemInner.java | 71 + .../ReplicationProtectedItemsImpl.java | 214 + .../ReplicationProtectedItemsInner.java | 5215 +++++++++++++++++ ...cationProtectionContainerMappingsImpl.java | 105 + ...ationProtectionContainerMappingsInner.java | 1668 ++++++ .../ReplicationProtectionContainersImpl.java | 123 + .../ReplicationProtectionContainersInner.java | 1960 +++++++ .../ReplicationRecoveryPlansImpl.java | 157 + .../ReplicationRecoveryPlansInner.java | 2216 +++++++ ...licationRecoveryServicesProvidersImpl.java | 108 + ...icationRecoveryServicesProvidersInner.java | 1205 ++++ ...tionStorageClassificationMappingsImpl.java | 99 + ...ionStorageClassificationMappingsInner.java | 1270 ++++ ...ReplicationStorageClassificationsImpl.java | 83 + ...eplicationStorageClassificationsInner.java | 654 +++ .../ReplicationVaultHealthsImpl.java | 42 + .../ReplicationVaultHealthsInner.java | 142 + .../ReplicationvCentersImpl.java | 99 + .../ReplicationvCentersInner.java | 1588 +++++ .../SiteRecoveryManagementClientImpl.java | 508 ++ .../StorageClassificationImpl.java | 66 + .../StorageClassificationInner.java | 71 + .../StorageClassificationMappingImpl.java | 105 + .../StorageClassificationMappingInner.java | 71 + .../implementation/VCenterImpl.java | 102 + .../implementation/VCenterInner.java | 71 + .../VaultHealthDetailsImpl.java | 52 + .../VaultHealthDetailsInner.java | 71 + .../implementation/package-info.java | 10 + .../v2018_01_10/package-info.java | 10 + 412 files changed, 70242 insertions(+) create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/pom.xml create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AApplyRecoveryPointInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AContainerCreationInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AEnableProtectionInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AEventDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AFailoverProviderInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2APolicyCreationInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2APolicyDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AProtectedDiskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AProtectedManagedDiskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AReplicationDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AReprotectInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2ARpRecoveryPointType.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2ASwitchProtectionInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AUpdateReplicationProtectedItemInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AVmDiskInputDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AVmManagedDiskInputDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ARMException.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ARMExceptionDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ARMInnerError.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ASRTask.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AddVCenterRequest.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AddVCenterRequestProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Alert.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AlertProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AlternateLocationRecoveryOption.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ApplyRecoveryPointInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ApplyRecoveryPointInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ApplyRecoveryPointProviderSpecificInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AsrJobDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AutomationRunbookTaskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureFabricCreationInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureFabricSpecificDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureToAzureCreateNetworkMappingInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureToAzureNetworkMappingSettings.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureToAzureUpdateNetworkMappingInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureToAzureVmSyncedConfigDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureVmDiskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ConfigurationSettings.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ConfigureAlertRequest.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ConfigureAlertRequestProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ConsistencyCheckTaskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateNetworkMappingInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateNetworkMappingInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreatePolicyInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreatePolicyInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateProtectionContainerInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateProtectionContainerInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateProtectionContainerMappingInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateProtectionContainerMappingInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateRecoveryPlanInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateRecoveryPlanInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CurrentScenarioDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DataStore.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DataSyncStatus.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DisableProtectionInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DisableProtectionInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DisableProtectionProviderSpecificInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DisableProtectionReason.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DiscoverProtectableItemRequest.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DiscoverProtectableItemRequestProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DiskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DiskVolumeDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Display.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EnableProtectionInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EnableProtectionInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EnableProtectionProviderSpecificInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EncryptionDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Event.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EventProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EventProviderSpecificDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EventQueryParameter.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EventSpecificDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ExportJobDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Fabric.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricCreationInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricCreationInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricReplicationGroupTaskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricSpecificCreateNetworkMappingInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricSpecificCreationInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricSpecificDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricSpecificUpdateNetworkMappingInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverDeploymentModel.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverJobDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverProcessServerRequest.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverProcessServerRequestProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverReplicationProtectedItemDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/GroupTaskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HealthError.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HealthErrorCategory.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HealthErrorSummary.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplica2012EventDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplica2012R2EventDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureApplyRecoveryPointInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureEnableProtectionInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureEventDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureFailbackProviderInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureFailoverProviderInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzurePolicyDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzurePolicyInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureReplicationDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureReprotectInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureRpRecoveryPointType.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureUpdateReplicationProtectedItemInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBaseEventDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBasePolicyDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBaseReplicationDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBluePolicyDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBluePolicyInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBlueReplicationDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaPolicyDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaPolicyInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaReplicationDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVSiteDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVVirtualMachineDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/IdentityInformation.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/IdentityProviderType.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAgentDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2ApplyRecoveryPointInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2EnableProtectionInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2EventDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2FailoverProviderInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2PolicyDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2PolicyInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2ProtectedDiskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2RecoveryPointDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2ReplicationDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2ReprotectInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2UpdateReplicationProtectedItemInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageBasePolicyDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageDisableProtectionProviderSpecificInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageDiskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageDiskExclusionInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageDiskSignatureExclusionOptions.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageEnableProtectionInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageFailoverProviderInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMagePolicyDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMagePolicyInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageProtectedDiskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageReplicationDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageReprotectInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageV2RpRecoveryPointType.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageVolumeExclusionOptions.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InconsistentVmDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InitialReplicationDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InlineWorkflowTaskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InputEndpoint.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Job.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobEntity.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobErrorDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobQueryParameter.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobStatusEventDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobTaskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/LicenseType.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/LogicalNetwork.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/LogicalNetworkProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ManualActionTaskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/MasterTargetServer.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/MethodCallStatus.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/MobilityServiceUpdate.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/MultiVmSyncStatus.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Network.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/NetworkMapping.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/NetworkMappingFabricSpecificSettings.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/NetworkMappingProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/NetworkProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/OSDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/OSDiskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Operations.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/OperationsDiscovery.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PlannedFailoverInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PlannedFailoverInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Policy.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PolicyProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PolicyProviderSpecificDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PolicyProviderSpecificInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PossibleOperationsDirections.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProcessServer.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectableItem.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectableItemProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectedItemsQueryParameter.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainer.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerFabricSpecificDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerMapping.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerMappingProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerMappingProviderSpecificDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProviderError.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProviderSpecificFailoverInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProviderSpecificRecoveryPointDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RcmAzureMigrationPolicyDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlan.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanA2AFailoverInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanAction.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanActionDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanActionLocation.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanAutomationRunbookActionDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanGroup.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanGroupTaskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanGroupType.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanHyperVReplicaAzureFailbackInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanHyperVReplicaAzureFailoverInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanInMageAzureV2FailoverInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanInMageFailoverInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanManualActionDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanPlannedFailoverInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanPlannedFailoverInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanProtectedItem.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanProviderSpecificFailoverInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanScriptActionDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanShutdownGroupTaskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanTestFailoverCleanupInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanTestFailoverCleanupInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanTestFailoverInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanTestFailoverInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanUnplannedFailoverInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanUnplannedFailoverInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPoint.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPointProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPointType.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPoints.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryServicesProvider.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryServicesProviderProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RemoveProtectionContainerMappingInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RemoveProtectionContainerMappingInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RenewCertificateInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RenewCertificateInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationAlertSettings.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationEvents.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationFabrics.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationGroupDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationJobs.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationLogicalNetworks.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationNetworkMappings.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationNetworks.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationPolicies.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectableItems.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectedItem.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectedItemOperation.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectedItemProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectedItems.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectionContainerMappings.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectionContainers.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProviderContainerUnmappingInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProviderSpecificContainerCreationInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProviderSpecificContainerMappingInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProviderSpecificSettings.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationRecoveryPlans.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationRecoveryServicesProviders.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationStorageClassificationMappings.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationStorageClassifications.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationVaultHealths.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationvCenters.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ResourceHealthSummary.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ResumeJobParams.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ResumeJobParamsProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RetentionVolume.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReverseReplicationInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReverseReplicationInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReverseReplicationProviderSpecificInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RoleAssignment.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RpInMageRecoveryPointType.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RunAsAccount.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SanEnableProtectionInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ScriptActionTaskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ServiceError.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SetMultiVmSyncStatus.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Severity.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SourceSiteOperations.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassification.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassificationMapping.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassificationMappingInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassificationMappingProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassificationProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageMappingInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Subnet.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SwitchProtectionInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SwitchProtectionInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SwitchProtectionJobDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SwitchProtectionProviderSpecificInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TaskTypeDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverCleanupInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverCleanupInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverJobDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UnplannedFailoverInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UnplannedFailoverInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateMobilityServiceRequest.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateMobilityServiceRequestProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateNetworkMappingInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateNetworkMappingInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdatePolicyInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdatePolicyInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateRecoveryPlanInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateRecoveryPlanInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateReplicationProtectedItemInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateReplicationProtectedItemInputProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateReplicationProtectedItemProviderInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateVCenterRequest.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateVCenterRequestProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VCenter.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VCenterProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMNicDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMNicInputDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareCbtPolicyCreationInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareV2FabricCreationInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareV2FabricSpecificDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareVirtualMachineDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VaultHealthDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VaultHealthProperties.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VirtualMachineTaskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmNicUpdatesTaskDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToAzureCreateNetworkMappingInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToAzureNetworkMappingSettings.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToAzureUpdateNetworkMappingInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToVmmCreateNetworkMappingInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToVmmNetworkMappingSettings.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToVmmUpdateNetworkMappingInput.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmwareCbtPolicyDetails.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/AlertImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/AlertInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/EventImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/EventInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/FabricImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/FabricInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/IdParsingUtils.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/JobImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/JobInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/LogicalNetworkImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/LogicalNetworkInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/NetworkImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/NetworkInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/NetworkMappingImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/NetworkMappingInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/OperationsDiscoveryImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/OperationsDiscoveryInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/OperationsImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/OperationsInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/PageImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/PolicyImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/PolicyInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectableItemImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectableItemInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectionContainerImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectionContainerInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectionContainerMappingImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectionContainerMappingInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPlanImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPlanInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPointImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPointInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPointsImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPointsInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryServicesManager.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryServicesProviderImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryServicesProviderInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationAlertSettingsImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationAlertSettingsInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationEventsImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationEventsInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationFabricsImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationFabricsInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationJobsImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationJobsInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationLogicalNetworksImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationLogicalNetworksInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationNetworkMappingsImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationNetworkMappingsInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationNetworksImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationNetworksInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationPoliciesImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationPoliciesInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectableItemsImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectableItemsInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectedItemImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectedItemInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectedItemsImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectedItemsInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectionContainerMappingsImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectionContainerMappingsInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectionContainersImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectionContainersInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationRecoveryPlansImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationRecoveryPlansInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationRecoveryServicesProvidersImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationRecoveryServicesProvidersInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationStorageClassificationMappingsImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationStorageClassificationMappingsInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationStorageClassificationsImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationStorageClassificationsInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationVaultHealthsImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationVaultHealthsInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationvCentersImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationvCentersInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/SiteRecoveryManagementClientImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/StorageClassificationImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/StorageClassificationInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/StorageClassificationMappingImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/StorageClassificationMappingInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/VCenterImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/VCenterInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/VaultHealthDetailsImpl.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/VaultHealthDetailsInner.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/package-info.java create mode 100644 recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/package-info.java diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/pom.xml b/recoveryservicessiterecovery/resource-manager/v2018_01_10/pom.xml new file mode 100644 index 0000000000000..e8eca14dd3196 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/pom.xml @@ -0,0 +1,133 @@ + + + 4.0.0 + com.microsoft.azure.recoveryservicessiterecovery.v2018_01_10 + + com.microsoft.azure + azure-arm-parent + 0.0.2-beta + ../../../pom.xml + + azure-mgmt-recoveryservices + 1.0.0-beta + jar + Microsoft Azure SDK for RecoveryServices Management + This package contains Microsoft RecoveryServices Management SDK. + https://github.com/Azure/azure-libraries-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-libraries-for-java + scm:git:git@github.com:Azure/azure-libraries-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AApplyRecoveryPointInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AApplyRecoveryPointInput.java new file mode 100644 index 0000000000000..cb98f63ccfccd --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AApplyRecoveryPointInput.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ApplyRecoveryPoint input specific to A2A provider. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("A2A") +public class A2AApplyRecoveryPointInput extends ApplyRecoveryPointProviderSpecificInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AContainerCreationInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AContainerCreationInput.java new file mode 100644 index 0000000000000..9a333dad11cec --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AContainerCreationInput.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * A2A cloud creation input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("A2A") +public class A2AContainerCreationInput extends ReplicationProviderSpecificContainerCreationInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AEnableProtectionInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AEnableProtectionInput.java new file mode 100644 index 0000000000000..5dda7edee3bc9 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AEnableProtectionInput.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * A2A enable protection input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("A2A") +public class A2AEnableProtectionInput extends EnableProtectionProviderSpecificInput { + /** + * The fabric specific object Id of the virtual machine. + */ + @JsonProperty(value = "fabricObjectId") + private String fabricObjectId; + + /** + * The recovery container Id. + */ + @JsonProperty(value = "recoveryContainerId") + private String recoveryContainerId; + + /** + * The recovery resource group Id. Valid for V2 scenarios. + */ + @JsonProperty(value = "recoveryResourceGroupId") + private String recoveryResourceGroupId; + + /** + * The recovery cloud service Id. Valid for V1 scenarios. + */ + @JsonProperty(value = "recoveryCloudServiceId") + private String recoveryCloudServiceId; + + /** + * The recovery availability set Id. + */ + @JsonProperty(value = "recoveryAvailabilitySetId") + private String recoveryAvailabilitySetId; + + /** + * The list of vm disk details. + */ + @JsonProperty(value = "vmDisks") + private List vmDisks; + + /** + * The list of vm managed disk details. + */ + @JsonProperty(value = "vmManagedDisks") + private List vmManagedDisks; + + /** + * Get the fabric specific object Id of the virtual machine. + * + * @return the fabricObjectId value + */ + public String fabricObjectId() { + return this.fabricObjectId; + } + + /** + * Set the fabric specific object Id of the virtual machine. + * + * @param fabricObjectId the fabricObjectId value to set + * @return the A2AEnableProtectionInput object itself. + */ + public A2AEnableProtectionInput withFabricObjectId(String fabricObjectId) { + this.fabricObjectId = fabricObjectId; + return this; + } + + /** + * Get the recovery container Id. + * + * @return the recoveryContainerId value + */ + public String recoveryContainerId() { + return this.recoveryContainerId; + } + + /** + * Set the recovery container Id. + * + * @param recoveryContainerId the recoveryContainerId value to set + * @return the A2AEnableProtectionInput object itself. + */ + public A2AEnableProtectionInput withRecoveryContainerId(String recoveryContainerId) { + this.recoveryContainerId = recoveryContainerId; + return this; + } + + /** + * Get the recovery resource group Id. Valid for V2 scenarios. + * + * @return the recoveryResourceGroupId value + */ + public String recoveryResourceGroupId() { + return this.recoveryResourceGroupId; + } + + /** + * Set the recovery resource group Id. Valid for V2 scenarios. + * + * @param recoveryResourceGroupId the recoveryResourceGroupId value to set + * @return the A2AEnableProtectionInput object itself. + */ + public A2AEnableProtectionInput withRecoveryResourceGroupId(String recoveryResourceGroupId) { + this.recoveryResourceGroupId = recoveryResourceGroupId; + return this; + } + + /** + * Get the recovery cloud service Id. Valid for V1 scenarios. + * + * @return the recoveryCloudServiceId value + */ + public String recoveryCloudServiceId() { + return this.recoveryCloudServiceId; + } + + /** + * Set the recovery cloud service Id. Valid for V1 scenarios. + * + * @param recoveryCloudServiceId the recoveryCloudServiceId value to set + * @return the A2AEnableProtectionInput object itself. + */ + public A2AEnableProtectionInput withRecoveryCloudServiceId(String recoveryCloudServiceId) { + this.recoveryCloudServiceId = recoveryCloudServiceId; + return this; + } + + /** + * Get the recovery availability set Id. + * + * @return the recoveryAvailabilitySetId value + */ + public String recoveryAvailabilitySetId() { + return this.recoveryAvailabilitySetId; + } + + /** + * Set the recovery availability set Id. + * + * @param recoveryAvailabilitySetId the recoveryAvailabilitySetId value to set + * @return the A2AEnableProtectionInput object itself. + */ + public A2AEnableProtectionInput withRecoveryAvailabilitySetId(String recoveryAvailabilitySetId) { + this.recoveryAvailabilitySetId = recoveryAvailabilitySetId; + return this; + } + + /** + * Get the list of vm disk details. + * + * @return the vmDisks value + */ + public List vmDisks() { + return this.vmDisks; + } + + /** + * Set the list of vm disk details. + * + * @param vmDisks the vmDisks value to set + * @return the A2AEnableProtectionInput object itself. + */ + public A2AEnableProtectionInput withVmDisks(List vmDisks) { + this.vmDisks = vmDisks; + return this; + } + + /** + * Get the list of vm managed disk details. + * + * @return the vmManagedDisks value + */ + public List vmManagedDisks() { + return this.vmManagedDisks; + } + + /** + * Set the list of vm managed disk details. + * + * @param vmManagedDisks the vmManagedDisks value to set + * @return the A2AEnableProtectionInput object itself. + */ + public A2AEnableProtectionInput withVmManagedDisks(List vmManagedDisks) { + this.vmManagedDisks = vmManagedDisks; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AEventDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AEventDetails.java new file mode 100644 index 0000000000000..c72ed0f9d8fdf --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AEventDetails.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Model class for event details of a A2A event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("A2A") +public class A2AEventDetails extends EventProviderSpecificDetails { + /** + * The protected item arm name. + */ + @JsonProperty(value = "protectedItemName") + private String protectedItemName; + + /** + * The azure vm arm id. + */ + @JsonProperty(value = "fabricObjectId") + private String fabricObjectId; + + /** + * Fabric arm name. + */ + @JsonProperty(value = "fabricName") + private String fabricName; + + /** + * The fabric location. + */ + @JsonProperty(value = "fabricLocation") + private String fabricLocation; + + /** + * Remote fabric arm name. + */ + @JsonProperty(value = "remoteFabricName") + private String remoteFabricName; + + /** + * Remote fabric location. + */ + @JsonProperty(value = "remoteFabricLocation") + private String remoteFabricLocation; + + /** + * Get the protected item arm name. + * + * @return the protectedItemName value + */ + public String protectedItemName() { + return this.protectedItemName; + } + + /** + * Set the protected item arm name. + * + * @param protectedItemName the protectedItemName value to set + * @return the A2AEventDetails object itself. + */ + public A2AEventDetails withProtectedItemName(String protectedItemName) { + this.protectedItemName = protectedItemName; + return this; + } + + /** + * Get the azure vm arm id. + * + * @return the fabricObjectId value + */ + public String fabricObjectId() { + return this.fabricObjectId; + } + + /** + * Set the azure vm arm id. + * + * @param fabricObjectId the fabricObjectId value to set + * @return the A2AEventDetails object itself. + */ + public A2AEventDetails withFabricObjectId(String fabricObjectId) { + this.fabricObjectId = fabricObjectId; + return this; + } + + /** + * Get fabric arm name. + * + * @return the fabricName value + */ + public String fabricName() { + return this.fabricName; + } + + /** + * Set fabric arm name. + * + * @param fabricName the fabricName value to set + * @return the A2AEventDetails object itself. + */ + public A2AEventDetails withFabricName(String fabricName) { + this.fabricName = fabricName; + return this; + } + + /** + * Get the fabric location. + * + * @return the fabricLocation value + */ + public String fabricLocation() { + return this.fabricLocation; + } + + /** + * Set the fabric location. + * + * @param fabricLocation the fabricLocation value to set + * @return the A2AEventDetails object itself. + */ + public A2AEventDetails withFabricLocation(String fabricLocation) { + this.fabricLocation = fabricLocation; + return this; + } + + /** + * Get remote fabric arm name. + * + * @return the remoteFabricName value + */ + public String remoteFabricName() { + return this.remoteFabricName; + } + + /** + * Set remote fabric arm name. + * + * @param remoteFabricName the remoteFabricName value to set + * @return the A2AEventDetails object itself. + */ + public A2AEventDetails withRemoteFabricName(String remoteFabricName) { + this.remoteFabricName = remoteFabricName; + return this; + } + + /** + * Get remote fabric location. + * + * @return the remoteFabricLocation value + */ + public String remoteFabricLocation() { + return this.remoteFabricLocation; + } + + /** + * Set remote fabric location. + * + * @param remoteFabricLocation the remoteFabricLocation value to set + * @return the A2AEventDetails object itself. + */ + public A2AEventDetails withRemoteFabricLocation(String remoteFabricLocation) { + this.remoteFabricLocation = remoteFabricLocation; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AFailoverProviderInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AFailoverProviderInput.java new file mode 100644 index 0000000000000..aa2c4bd05de29 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AFailoverProviderInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * A2A provider specific input for failover. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("A2A") +public class A2AFailoverProviderInput extends ProviderSpecificFailoverInput { + /** + * The recovery point id to be passed to failover to a particular recovery + * point. In case of latest recovery point, null should be passed. + */ + @JsonProperty(value = "recoveryPointId") + private String recoveryPointId; + + /** + * A value indicating whether to use recovery cloud service for TFO or not. + */ + @JsonProperty(value = "cloudServiceCreationOption") + private String cloudServiceCreationOption; + + /** + * Get the recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. + * + * @return the recoveryPointId value + */ + public String recoveryPointId() { + return this.recoveryPointId; + } + + /** + * Set the recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. + * + * @param recoveryPointId the recoveryPointId value to set + * @return the A2AFailoverProviderInput object itself. + */ + public A2AFailoverProviderInput withRecoveryPointId(String recoveryPointId) { + this.recoveryPointId = recoveryPointId; + return this; + } + + /** + * Get a value indicating whether to use recovery cloud service for TFO or not. + * + * @return the cloudServiceCreationOption value + */ + public String cloudServiceCreationOption() { + return this.cloudServiceCreationOption; + } + + /** + * Set a value indicating whether to use recovery cloud service for TFO or not. + * + * @param cloudServiceCreationOption the cloudServiceCreationOption value to set + * @return the A2AFailoverProviderInput object itself. + */ + public A2AFailoverProviderInput withCloudServiceCreationOption(String cloudServiceCreationOption) { + this.cloudServiceCreationOption = cloudServiceCreationOption; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2APolicyCreationInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2APolicyCreationInput.java new file mode 100644 index 0000000000000..a78d0a5ba3fc3 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2APolicyCreationInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * A2A Policy creation input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("A2A") +public class A2APolicyCreationInput extends PolicyProviderSpecificInput { + /** + * The duration in minutes until which the recovery points need to be + * stored. + */ + @JsonProperty(value = "recoveryPointHistory") + private Integer recoveryPointHistory; + + /** + * The crash consistent snapshot frequency (in minutes). + */ + @JsonProperty(value = "crashConsistentFrequencyInMinutes") + private Integer crashConsistentFrequencyInMinutes; + + /** + * The app consistent snapshot frequency (in minutes). + */ + @JsonProperty(value = "appConsistentFrequencyInMinutes") + private Integer appConsistentFrequencyInMinutes; + + /** + * A value indicating whether multi-VM sync has to be enabled. Value should + * be 'Enabled' or 'Disabled'. Possible values include: 'Enable', + * 'Disable'. + */ + @JsonProperty(value = "multiVmSyncStatus", required = true) + private SetMultiVmSyncStatus multiVmSyncStatus; + + /** + * Get the duration in minutes until which the recovery points need to be stored. + * + * @return the recoveryPointHistory value + */ + public Integer recoveryPointHistory() { + return this.recoveryPointHistory; + } + + /** + * Set the duration in minutes until which the recovery points need to be stored. + * + * @param recoveryPointHistory the recoveryPointHistory value to set + * @return the A2APolicyCreationInput object itself. + */ + public A2APolicyCreationInput withRecoveryPointHistory(Integer recoveryPointHistory) { + this.recoveryPointHistory = recoveryPointHistory; + return this; + } + + /** + * Get the crash consistent snapshot frequency (in minutes). + * + * @return the crashConsistentFrequencyInMinutes value + */ + public Integer crashConsistentFrequencyInMinutes() { + return this.crashConsistentFrequencyInMinutes; + } + + /** + * Set the crash consistent snapshot frequency (in minutes). + * + * @param crashConsistentFrequencyInMinutes the crashConsistentFrequencyInMinutes value to set + * @return the A2APolicyCreationInput object itself. + */ + public A2APolicyCreationInput withCrashConsistentFrequencyInMinutes(Integer crashConsistentFrequencyInMinutes) { + this.crashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + return this; + } + + /** + * Get the app consistent snapshot frequency (in minutes). + * + * @return the appConsistentFrequencyInMinutes value + */ + public Integer appConsistentFrequencyInMinutes() { + return this.appConsistentFrequencyInMinutes; + } + + /** + * Set the app consistent snapshot frequency (in minutes). + * + * @param appConsistentFrequencyInMinutes the appConsistentFrequencyInMinutes value to set + * @return the A2APolicyCreationInput object itself. + */ + public A2APolicyCreationInput withAppConsistentFrequencyInMinutes(Integer appConsistentFrequencyInMinutes) { + this.appConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + return this; + } + + /** + * Get a value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable'. + * + * @return the multiVmSyncStatus value + */ + public SetMultiVmSyncStatus multiVmSyncStatus() { + return this.multiVmSyncStatus; + } + + /** + * Set a value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable'. + * + * @param multiVmSyncStatus the multiVmSyncStatus value to set + * @return the A2APolicyCreationInput object itself. + */ + public A2APolicyCreationInput withMultiVmSyncStatus(SetMultiVmSyncStatus multiVmSyncStatus) { + this.multiVmSyncStatus = multiVmSyncStatus; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2APolicyDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2APolicyDetails.java new file mode 100644 index 0000000000000..830abdc15f145 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2APolicyDetails.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * A2A specific policy details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("A2A") +public class A2APolicyDetails extends PolicyProviderSpecificDetails { + /** + * The recovery point threshold in minutes. + */ + @JsonProperty(value = "recoveryPointThresholdInMinutes") + private Integer recoveryPointThresholdInMinutes; + + /** + * The duration in minutes until which the recovery points need to be + * stored. + */ + @JsonProperty(value = "recoveryPointHistory") + private Integer recoveryPointHistory; + + /** + * The app consistent snapshot frequency in minutes. + */ + @JsonProperty(value = "appConsistentFrequencyInMinutes") + private Integer appConsistentFrequencyInMinutes; + + /** + * A value indicating whether multi-VM sync has to be enabled. + */ + @JsonProperty(value = "multiVmSyncStatus") + private String multiVmSyncStatus; + + /** + * The crash consistent snapshot frequency in minutes. + */ + @JsonProperty(value = "crashConsistentFrequencyInMinutes") + private Integer crashConsistentFrequencyInMinutes; + + /** + * Get the recovery point threshold in minutes. + * + * @return the recoveryPointThresholdInMinutes value + */ + public Integer recoveryPointThresholdInMinutes() { + return this.recoveryPointThresholdInMinutes; + } + + /** + * Set the recovery point threshold in minutes. + * + * @param recoveryPointThresholdInMinutes the recoveryPointThresholdInMinutes value to set + * @return the A2APolicyDetails object itself. + */ + public A2APolicyDetails withRecoveryPointThresholdInMinutes(Integer recoveryPointThresholdInMinutes) { + this.recoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + return this; + } + + /** + * Get the duration in minutes until which the recovery points need to be stored. + * + * @return the recoveryPointHistory value + */ + public Integer recoveryPointHistory() { + return this.recoveryPointHistory; + } + + /** + * Set the duration in minutes until which the recovery points need to be stored. + * + * @param recoveryPointHistory the recoveryPointHistory value to set + * @return the A2APolicyDetails object itself. + */ + public A2APolicyDetails withRecoveryPointHistory(Integer recoveryPointHistory) { + this.recoveryPointHistory = recoveryPointHistory; + return this; + } + + /** + * Get the app consistent snapshot frequency in minutes. + * + * @return the appConsistentFrequencyInMinutes value + */ + public Integer appConsistentFrequencyInMinutes() { + return this.appConsistentFrequencyInMinutes; + } + + /** + * Set the app consistent snapshot frequency in minutes. + * + * @param appConsistentFrequencyInMinutes the appConsistentFrequencyInMinutes value to set + * @return the A2APolicyDetails object itself. + */ + public A2APolicyDetails withAppConsistentFrequencyInMinutes(Integer appConsistentFrequencyInMinutes) { + this.appConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + return this; + } + + /** + * Get a value indicating whether multi-VM sync has to be enabled. + * + * @return the multiVmSyncStatus value + */ + public String multiVmSyncStatus() { + return this.multiVmSyncStatus; + } + + /** + * Set a value indicating whether multi-VM sync has to be enabled. + * + * @param multiVmSyncStatus the multiVmSyncStatus value to set + * @return the A2APolicyDetails object itself. + */ + public A2APolicyDetails withMultiVmSyncStatus(String multiVmSyncStatus) { + this.multiVmSyncStatus = multiVmSyncStatus; + return this; + } + + /** + * Get the crash consistent snapshot frequency in minutes. + * + * @return the crashConsistentFrequencyInMinutes value + */ + public Integer crashConsistentFrequencyInMinutes() { + return this.crashConsistentFrequencyInMinutes; + } + + /** + * Set the crash consistent snapshot frequency in minutes. + * + * @param crashConsistentFrequencyInMinutes the crashConsistentFrequencyInMinutes value to set + * @return the A2APolicyDetails object itself. + */ + public A2APolicyDetails withCrashConsistentFrequencyInMinutes(Integer crashConsistentFrequencyInMinutes) { + this.crashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AProtectedDiskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AProtectedDiskDetails.java new file mode 100644 index 0000000000000..60b1de41a26ee --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AProtectedDiskDetails.java @@ -0,0 +1,357 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A2A protected disk details. + */ +public class A2AProtectedDiskDetails { + /** + * The disk uri. + */ + @JsonProperty(value = "diskUri") + private String diskUri; + + /** + * The recovery disk storage account. + */ + @JsonProperty(value = "recoveryAzureStorageAccountId") + private String recoveryAzureStorageAccountId; + + /** + * The primary disk storage account. + */ + @JsonProperty(value = "primaryDiskAzureStorageAccountId") + private String primaryDiskAzureStorageAccountId; + + /** + * Recovery disk uri. + */ + @JsonProperty(value = "recoveryDiskUri") + private String recoveryDiskUri; + + /** + * The disk name. + */ + @JsonProperty(value = "diskName") + private String diskName; + + /** + * The disk capacity in bytes. + */ + @JsonProperty(value = "diskCapacityInBytes") + private Long diskCapacityInBytes; + + /** + * The primary staging storage account. + */ + @JsonProperty(value = "primaryStagingAzureStorageAccountId") + private String primaryStagingAzureStorageAccountId; + + /** + * The type of disk. + */ + @JsonProperty(value = "diskType") + private String diskType; + + /** + * A value indicating whether resync is required for this disk. + */ + @JsonProperty(value = "resyncRequired") + private Boolean resyncRequired; + + /** + * The percentage of the monitoring job. The type of the monitoring job is + * defined by MonitoringJobType property. + */ + @JsonProperty(value = "monitoringPercentageCompletion") + private Integer monitoringPercentageCompletion; + + /** + * The type of the monitoring job. The progress is contained in + * MonitoringPercentageCompletion property. + */ + @JsonProperty(value = "monitoringJobType") + private String monitoringJobType; + + /** + * The data pending for replication in MB at staging account. + */ + @JsonProperty(value = "dataPendingInStagingStorageAccountInMB") + private Double dataPendingInStagingStorageAccountInMB; + + /** + * The data pending at source virtual machine in MB. + */ + @JsonProperty(value = "dataPendingAtSourceAgentInMB") + private Double dataPendingAtSourceAgentInMB; + + /** + * Get the disk uri. + * + * @return the diskUri value + */ + public String diskUri() { + return this.diskUri; + } + + /** + * Set the disk uri. + * + * @param diskUri the diskUri value to set + * @return the A2AProtectedDiskDetails object itself. + */ + public A2AProtectedDiskDetails withDiskUri(String diskUri) { + this.diskUri = diskUri; + return this; + } + + /** + * Get the recovery disk storage account. + * + * @return the recoveryAzureStorageAccountId value + */ + public String recoveryAzureStorageAccountId() { + return this.recoveryAzureStorageAccountId; + } + + /** + * Set the recovery disk storage account. + * + * @param recoveryAzureStorageAccountId the recoveryAzureStorageAccountId value to set + * @return the A2AProtectedDiskDetails object itself. + */ + public A2AProtectedDiskDetails withRecoveryAzureStorageAccountId(String recoveryAzureStorageAccountId) { + this.recoveryAzureStorageAccountId = recoveryAzureStorageAccountId; + return this; + } + + /** + * Get the primary disk storage account. + * + * @return the primaryDiskAzureStorageAccountId value + */ + public String primaryDiskAzureStorageAccountId() { + return this.primaryDiskAzureStorageAccountId; + } + + /** + * Set the primary disk storage account. + * + * @param primaryDiskAzureStorageAccountId the primaryDiskAzureStorageAccountId value to set + * @return the A2AProtectedDiskDetails object itself. + */ + public A2AProtectedDiskDetails withPrimaryDiskAzureStorageAccountId(String primaryDiskAzureStorageAccountId) { + this.primaryDiskAzureStorageAccountId = primaryDiskAzureStorageAccountId; + return this; + } + + /** + * Get recovery disk uri. + * + * @return the recoveryDiskUri value + */ + public String recoveryDiskUri() { + return this.recoveryDiskUri; + } + + /** + * Set recovery disk uri. + * + * @param recoveryDiskUri the recoveryDiskUri value to set + * @return the A2AProtectedDiskDetails object itself. + */ + public A2AProtectedDiskDetails withRecoveryDiskUri(String recoveryDiskUri) { + this.recoveryDiskUri = recoveryDiskUri; + return this; + } + + /** + * Get the disk name. + * + * @return the diskName value + */ + public String diskName() { + return this.diskName; + } + + /** + * Set the disk name. + * + * @param diskName the diskName value to set + * @return the A2AProtectedDiskDetails object itself. + */ + public A2AProtectedDiskDetails withDiskName(String diskName) { + this.diskName = diskName; + return this; + } + + /** + * Get the disk capacity in bytes. + * + * @return the diskCapacityInBytes value + */ + public Long diskCapacityInBytes() { + return this.diskCapacityInBytes; + } + + /** + * Set the disk capacity in bytes. + * + * @param diskCapacityInBytes the diskCapacityInBytes value to set + * @return the A2AProtectedDiskDetails object itself. + */ + public A2AProtectedDiskDetails withDiskCapacityInBytes(Long diskCapacityInBytes) { + this.diskCapacityInBytes = diskCapacityInBytes; + return this; + } + + /** + * Get the primary staging storage account. + * + * @return the primaryStagingAzureStorageAccountId value + */ + public String primaryStagingAzureStorageAccountId() { + return this.primaryStagingAzureStorageAccountId; + } + + /** + * Set the primary staging storage account. + * + * @param primaryStagingAzureStorageAccountId the primaryStagingAzureStorageAccountId value to set + * @return the A2AProtectedDiskDetails object itself. + */ + public A2AProtectedDiskDetails withPrimaryStagingAzureStorageAccountId(String primaryStagingAzureStorageAccountId) { + this.primaryStagingAzureStorageAccountId = primaryStagingAzureStorageAccountId; + return this; + } + + /** + * Get the type of disk. + * + * @return the diskType value + */ + public String diskType() { + return this.diskType; + } + + /** + * Set the type of disk. + * + * @param diskType the diskType value to set + * @return the A2AProtectedDiskDetails object itself. + */ + public A2AProtectedDiskDetails withDiskType(String diskType) { + this.diskType = diskType; + return this; + } + + /** + * Get a value indicating whether resync is required for this disk. + * + * @return the resyncRequired value + */ + public Boolean resyncRequired() { + return this.resyncRequired; + } + + /** + * Set a value indicating whether resync is required for this disk. + * + * @param resyncRequired the resyncRequired value to set + * @return the A2AProtectedDiskDetails object itself. + */ + public A2AProtectedDiskDetails withResyncRequired(Boolean resyncRequired) { + this.resyncRequired = resyncRequired; + return this; + } + + /** + * Get the percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. + * + * @return the monitoringPercentageCompletion value + */ + public Integer monitoringPercentageCompletion() { + return this.monitoringPercentageCompletion; + } + + /** + * Set the percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. + * + * @param monitoringPercentageCompletion the monitoringPercentageCompletion value to set + * @return the A2AProtectedDiskDetails object itself. + */ + public A2AProtectedDiskDetails withMonitoringPercentageCompletion(Integer monitoringPercentageCompletion) { + this.monitoringPercentageCompletion = monitoringPercentageCompletion; + return this; + } + + /** + * Get the type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. + * + * @return the monitoringJobType value + */ + public String monitoringJobType() { + return this.monitoringJobType; + } + + /** + * Set the type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. + * + * @param monitoringJobType the monitoringJobType value to set + * @return the A2AProtectedDiskDetails object itself. + */ + public A2AProtectedDiskDetails withMonitoringJobType(String monitoringJobType) { + this.monitoringJobType = monitoringJobType; + return this; + } + + /** + * Get the data pending for replication in MB at staging account. + * + * @return the dataPendingInStagingStorageAccountInMB value + */ + public Double dataPendingInStagingStorageAccountInMB() { + return this.dataPendingInStagingStorageAccountInMB; + } + + /** + * Set the data pending for replication in MB at staging account. + * + * @param dataPendingInStagingStorageAccountInMB the dataPendingInStagingStorageAccountInMB value to set + * @return the A2AProtectedDiskDetails object itself. + */ + public A2AProtectedDiskDetails withDataPendingInStagingStorageAccountInMB(Double dataPendingInStagingStorageAccountInMB) { + this.dataPendingInStagingStorageAccountInMB = dataPendingInStagingStorageAccountInMB; + return this; + } + + /** + * Get the data pending at source virtual machine in MB. + * + * @return the dataPendingAtSourceAgentInMB value + */ + public Double dataPendingAtSourceAgentInMB() { + return this.dataPendingAtSourceAgentInMB; + } + + /** + * Set the data pending at source virtual machine in MB. + * + * @param dataPendingAtSourceAgentInMB the dataPendingAtSourceAgentInMB value to set + * @return the A2AProtectedDiskDetails object itself. + */ + public A2AProtectedDiskDetails withDataPendingAtSourceAgentInMB(Double dataPendingAtSourceAgentInMB) { + this.dataPendingAtSourceAgentInMB = dataPendingAtSourceAgentInMB; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AProtectedManagedDiskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AProtectedManagedDiskDetails.java new file mode 100644 index 0000000000000..1dbfab4c9ee24 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AProtectedManagedDiskDetails.java @@ -0,0 +1,331 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A2A protected managed disk details. + */ +public class A2AProtectedManagedDiskDetails { + /** + * The managed disk Arm id. + */ + @JsonProperty(value = "diskId") + private String diskId; + + /** + * The recovery disk resource group Arm Id. + */ + @JsonProperty(value = "recoveryAzureResourceGroupId") + private String recoveryAzureResourceGroupId; + + /** + * Recovery disk Arm Id. + */ + @JsonProperty(value = "recoveryDiskId") + private String recoveryDiskId; + + /** + * The disk name. + */ + @JsonProperty(value = "diskName") + private String diskName; + + /** + * The disk capacity in bytes. + */ + @JsonProperty(value = "diskCapacityInBytes") + private Long diskCapacityInBytes; + + /** + * The primary staging storage account. + */ + @JsonProperty(value = "primaryStagingAzureStorageAccountId") + private String primaryStagingAzureStorageAccountId; + + /** + * The type of disk. + */ + @JsonProperty(value = "diskType") + private String diskType; + + /** + * A value indicating whether resync is required for this disk. + */ + @JsonProperty(value = "resyncRequired") + private Boolean resyncRequired; + + /** + * The percentage of the monitoring job. The type of the monitoring job is + * defined by MonitoringJobType property. + */ + @JsonProperty(value = "monitoringPercentageCompletion") + private Integer monitoringPercentageCompletion; + + /** + * The type of the monitoring job. The progress is contained in + * MonitoringPercentageCompletion property. + */ + @JsonProperty(value = "monitoringJobType") + private String monitoringJobType; + + /** + * The data pending for replication in MB at staging account. + */ + @JsonProperty(value = "dataPendingInStagingStorageAccountInMB") + private Double dataPendingInStagingStorageAccountInMB; + + /** + * The data pending at source virtual machine in MB. + */ + @JsonProperty(value = "dataPendingAtSourceAgentInMB") + private Double dataPendingAtSourceAgentInMB; + + /** + * Get the managed disk Arm id. + * + * @return the diskId value + */ + public String diskId() { + return this.diskId; + } + + /** + * Set the managed disk Arm id. + * + * @param diskId the diskId value to set + * @return the A2AProtectedManagedDiskDetails object itself. + */ + public A2AProtectedManagedDiskDetails withDiskId(String diskId) { + this.diskId = diskId; + return this; + } + + /** + * Get the recovery disk resource group Arm Id. + * + * @return the recoveryAzureResourceGroupId value + */ + public String recoveryAzureResourceGroupId() { + return this.recoveryAzureResourceGroupId; + } + + /** + * Set the recovery disk resource group Arm Id. + * + * @param recoveryAzureResourceGroupId the recoveryAzureResourceGroupId value to set + * @return the A2AProtectedManagedDiskDetails object itself. + */ + public A2AProtectedManagedDiskDetails withRecoveryAzureResourceGroupId(String recoveryAzureResourceGroupId) { + this.recoveryAzureResourceGroupId = recoveryAzureResourceGroupId; + return this; + } + + /** + * Get recovery disk Arm Id. + * + * @return the recoveryDiskId value + */ + public String recoveryDiskId() { + return this.recoveryDiskId; + } + + /** + * Set recovery disk Arm Id. + * + * @param recoveryDiskId the recoveryDiskId value to set + * @return the A2AProtectedManagedDiskDetails object itself. + */ + public A2AProtectedManagedDiskDetails withRecoveryDiskId(String recoveryDiskId) { + this.recoveryDiskId = recoveryDiskId; + return this; + } + + /** + * Get the disk name. + * + * @return the diskName value + */ + public String diskName() { + return this.diskName; + } + + /** + * Set the disk name. + * + * @param diskName the diskName value to set + * @return the A2AProtectedManagedDiskDetails object itself. + */ + public A2AProtectedManagedDiskDetails withDiskName(String diskName) { + this.diskName = diskName; + return this; + } + + /** + * Get the disk capacity in bytes. + * + * @return the diskCapacityInBytes value + */ + public Long diskCapacityInBytes() { + return this.diskCapacityInBytes; + } + + /** + * Set the disk capacity in bytes. + * + * @param diskCapacityInBytes the diskCapacityInBytes value to set + * @return the A2AProtectedManagedDiskDetails object itself. + */ + public A2AProtectedManagedDiskDetails withDiskCapacityInBytes(Long diskCapacityInBytes) { + this.diskCapacityInBytes = diskCapacityInBytes; + return this; + } + + /** + * Get the primary staging storage account. + * + * @return the primaryStagingAzureStorageAccountId value + */ + public String primaryStagingAzureStorageAccountId() { + return this.primaryStagingAzureStorageAccountId; + } + + /** + * Set the primary staging storage account. + * + * @param primaryStagingAzureStorageAccountId the primaryStagingAzureStorageAccountId value to set + * @return the A2AProtectedManagedDiskDetails object itself. + */ + public A2AProtectedManagedDiskDetails withPrimaryStagingAzureStorageAccountId(String primaryStagingAzureStorageAccountId) { + this.primaryStagingAzureStorageAccountId = primaryStagingAzureStorageAccountId; + return this; + } + + /** + * Get the type of disk. + * + * @return the diskType value + */ + public String diskType() { + return this.diskType; + } + + /** + * Set the type of disk. + * + * @param diskType the diskType value to set + * @return the A2AProtectedManagedDiskDetails object itself. + */ + public A2AProtectedManagedDiskDetails withDiskType(String diskType) { + this.diskType = diskType; + return this; + } + + /** + * Get a value indicating whether resync is required for this disk. + * + * @return the resyncRequired value + */ + public Boolean resyncRequired() { + return this.resyncRequired; + } + + /** + * Set a value indicating whether resync is required for this disk. + * + * @param resyncRequired the resyncRequired value to set + * @return the A2AProtectedManagedDiskDetails object itself. + */ + public A2AProtectedManagedDiskDetails withResyncRequired(Boolean resyncRequired) { + this.resyncRequired = resyncRequired; + return this; + } + + /** + * Get the percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. + * + * @return the monitoringPercentageCompletion value + */ + public Integer monitoringPercentageCompletion() { + return this.monitoringPercentageCompletion; + } + + /** + * Set the percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. + * + * @param monitoringPercentageCompletion the monitoringPercentageCompletion value to set + * @return the A2AProtectedManagedDiskDetails object itself. + */ + public A2AProtectedManagedDiskDetails withMonitoringPercentageCompletion(Integer monitoringPercentageCompletion) { + this.monitoringPercentageCompletion = monitoringPercentageCompletion; + return this; + } + + /** + * Get the type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. + * + * @return the monitoringJobType value + */ + public String monitoringJobType() { + return this.monitoringJobType; + } + + /** + * Set the type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. + * + * @param monitoringJobType the monitoringJobType value to set + * @return the A2AProtectedManagedDiskDetails object itself. + */ + public A2AProtectedManagedDiskDetails withMonitoringJobType(String monitoringJobType) { + this.monitoringJobType = monitoringJobType; + return this; + } + + /** + * Get the data pending for replication in MB at staging account. + * + * @return the dataPendingInStagingStorageAccountInMB value + */ + public Double dataPendingInStagingStorageAccountInMB() { + return this.dataPendingInStagingStorageAccountInMB; + } + + /** + * Set the data pending for replication in MB at staging account. + * + * @param dataPendingInStagingStorageAccountInMB the dataPendingInStagingStorageAccountInMB value to set + * @return the A2AProtectedManagedDiskDetails object itself. + */ + public A2AProtectedManagedDiskDetails withDataPendingInStagingStorageAccountInMB(Double dataPendingInStagingStorageAccountInMB) { + this.dataPendingInStagingStorageAccountInMB = dataPendingInStagingStorageAccountInMB; + return this; + } + + /** + * Get the data pending at source virtual machine in MB. + * + * @return the dataPendingAtSourceAgentInMB value + */ + public Double dataPendingAtSourceAgentInMB() { + return this.dataPendingAtSourceAgentInMB; + } + + /** + * Set the data pending at source virtual machine in MB. + * + * @param dataPendingAtSourceAgentInMB the dataPendingAtSourceAgentInMB value to set + * @return the A2AProtectedManagedDiskDetails object itself. + */ + public A2AProtectedManagedDiskDetails withDataPendingAtSourceAgentInMB(Double dataPendingAtSourceAgentInMB) { + this.dataPendingAtSourceAgentInMB = dataPendingAtSourceAgentInMB; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AReplicationDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AReplicationDetails.java new file mode 100644 index 0000000000000..df6f1ebe2e604 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AReplicationDetails.java @@ -0,0 +1,784 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * A2A provider specific settings. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("A2A") +public class A2AReplicationDetails extends ReplicationProviderSpecificSettings { + /** + * The fabric specific object Id of the virtual machine. + */ + @JsonProperty(value = "fabricObjectId") + private String fabricObjectId; + + /** + * The multi vm group Id. + */ + @JsonProperty(value = "multiVmGroupId") + private String multiVmGroupId; + + /** + * The multi vm group name. + */ + @JsonProperty(value = "multiVmGroupName") + private String multiVmGroupName; + + /** + * The management Id. + */ + @JsonProperty(value = "managementId") + private String managementId; + + /** + * The list of protected disks. + */ + @JsonProperty(value = "protectedDisks") + private List protectedDisks; + + /** + * The list of protected managed disks. + */ + @JsonProperty(value = "protectedManagedDisks") + private List protectedManagedDisks; + + /** + * Primary fabric location. + */ + @JsonProperty(value = "primaryFabricLocation") + private String primaryFabricLocation; + + /** + * The recovery fabric location. + */ + @JsonProperty(value = "recoveryFabricLocation") + private String recoveryFabricLocation; + + /** + * The type of operating system. + */ + @JsonProperty(value = "osType") + private String osType; + + /** + * The size of recovery virtual machine. + */ + @JsonProperty(value = "recoveryAzureVMSize") + private String recoveryAzureVMSize; + + /** + * The name of recovery virtual machine. + */ + @JsonProperty(value = "recoveryAzureVMName") + private String recoveryAzureVMName; + + /** + * The recovery resource group. + */ + @JsonProperty(value = "recoveryAzureResourceGroupId") + private String recoveryAzureResourceGroupId; + + /** + * The recovery cloud service. + */ + @JsonProperty(value = "recoveryCloudService") + private String recoveryCloudService; + + /** + * The recovery availability set. + */ + @JsonProperty(value = "recoveryAvailabilitySet") + private String recoveryAvailabilitySet; + + /** + * The recovery virtual network. + */ + @JsonProperty(value = "selectedRecoveryAzureNetworkId") + private String selectedRecoveryAzureNetworkId; + + /** + * The virtual machine nic details. + */ + @JsonProperty(value = "vmNics") + private List vmNics; + + /** + * The synced configuration details. + */ + @JsonProperty(value = "vmSyncedConfigDetails") + private AzureToAzureVmSyncedConfigDetails vmSyncedConfigDetails; + + /** + * The percentage of the monitoring job. The type of the monitoring job is + * defined by MonitoringJobType property. + */ + @JsonProperty(value = "monitoringPercentageCompletion") + private Integer monitoringPercentageCompletion; + + /** + * The type of the monitoring job. The progress is contained in + * MonitoringPercentageCompletion property. + */ + @JsonProperty(value = "monitoringJobType") + private String monitoringJobType; + + /** + * The last heartbeat received from the source server. + */ + @JsonProperty(value = "lastHeartbeat") + private DateTime lastHeartbeat; + + /** + * The agent version. + */ + @JsonProperty(value = "agentVersion") + private String agentVersion; + + /** + * A value indicating whether replication agent update is required. + */ + @JsonProperty(value = "isReplicationAgentUpdateRequired") + private Boolean isReplicationAgentUpdateRequired; + + /** + * The recovery fabric object Id. + */ + @JsonProperty(value = "recoveryFabricObjectId") + private String recoveryFabricObjectId; + + /** + * The protection state for the vm. + */ + @JsonProperty(value = "vmProtectionState") + private String vmProtectionState; + + /** + * The protection state description for the vm. + */ + @JsonProperty(value = "vmProtectionStateDescription") + private String vmProtectionStateDescription; + + /** + * An id associated with the PE that survives actions like switch + * protection which change the backing PE/CPE objects internally.The + * lifecycle id gets carried forward to have a link/continuity in being + * able to have an Id that denotes the "same" protected item even though + * other internal Ids/ARM Id might be changing. + */ + @JsonProperty(value = "lifecycleId") + private String lifecycleId; + + /** + * The test failover fabric object Id. + */ + @JsonProperty(value = "testFailoverRecoveryFabricObjectId") + private String testFailoverRecoveryFabricObjectId; + + /** + * The last RPO value in seconds. + */ + @JsonProperty(value = "rpoInSeconds") + private Long rpoInSeconds; + + /** + * The time (in UTC) when the last RPO value was calculated by Protection + * Service. + */ + @JsonProperty(value = "lastRpoCalculatedTime") + private DateTime lastRpoCalculatedTime; + + /** + * Get the fabric specific object Id of the virtual machine. + * + * @return the fabricObjectId value + */ + public String fabricObjectId() { + return this.fabricObjectId; + } + + /** + * Set the fabric specific object Id of the virtual machine. + * + * @param fabricObjectId the fabricObjectId value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withFabricObjectId(String fabricObjectId) { + this.fabricObjectId = fabricObjectId; + return this; + } + + /** + * Get the multi vm group Id. + * + * @return the multiVmGroupId value + */ + public String multiVmGroupId() { + return this.multiVmGroupId; + } + + /** + * Set the multi vm group Id. + * + * @param multiVmGroupId the multiVmGroupId value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withMultiVmGroupId(String multiVmGroupId) { + this.multiVmGroupId = multiVmGroupId; + return this; + } + + /** + * Get the multi vm group name. + * + * @return the multiVmGroupName value + */ + public String multiVmGroupName() { + return this.multiVmGroupName; + } + + /** + * Set the multi vm group name. + * + * @param multiVmGroupName the multiVmGroupName value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withMultiVmGroupName(String multiVmGroupName) { + this.multiVmGroupName = multiVmGroupName; + return this; + } + + /** + * Get the management Id. + * + * @return the managementId value + */ + public String managementId() { + return this.managementId; + } + + /** + * Set the management Id. + * + * @param managementId the managementId value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withManagementId(String managementId) { + this.managementId = managementId; + return this; + } + + /** + * Get the list of protected disks. + * + * @return the protectedDisks value + */ + public List protectedDisks() { + return this.protectedDisks; + } + + /** + * Set the list of protected disks. + * + * @param protectedDisks the protectedDisks value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withProtectedDisks(List protectedDisks) { + this.protectedDisks = protectedDisks; + return this; + } + + /** + * Get the list of protected managed disks. + * + * @return the protectedManagedDisks value + */ + public List protectedManagedDisks() { + return this.protectedManagedDisks; + } + + /** + * Set the list of protected managed disks. + * + * @param protectedManagedDisks the protectedManagedDisks value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withProtectedManagedDisks(List protectedManagedDisks) { + this.protectedManagedDisks = protectedManagedDisks; + return this; + } + + /** + * Get primary fabric location. + * + * @return the primaryFabricLocation value + */ + public String primaryFabricLocation() { + return this.primaryFabricLocation; + } + + /** + * Set primary fabric location. + * + * @param primaryFabricLocation the primaryFabricLocation value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withPrimaryFabricLocation(String primaryFabricLocation) { + this.primaryFabricLocation = primaryFabricLocation; + return this; + } + + /** + * Get the recovery fabric location. + * + * @return the recoveryFabricLocation value + */ + public String recoveryFabricLocation() { + return this.recoveryFabricLocation; + } + + /** + * Set the recovery fabric location. + * + * @param recoveryFabricLocation the recoveryFabricLocation value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withRecoveryFabricLocation(String recoveryFabricLocation) { + this.recoveryFabricLocation = recoveryFabricLocation; + return this; + } + + /** + * Get the type of operating system. + * + * @return the osType value + */ + public String osType() { + return this.osType; + } + + /** + * Set the type of operating system. + * + * @param osType the osType value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withOsType(String osType) { + this.osType = osType; + return this; + } + + /** + * Get the size of recovery virtual machine. + * + * @return the recoveryAzureVMSize value + */ + public String recoveryAzureVMSize() { + return this.recoveryAzureVMSize; + } + + /** + * Set the size of recovery virtual machine. + * + * @param recoveryAzureVMSize the recoveryAzureVMSize value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withRecoveryAzureVMSize(String recoveryAzureVMSize) { + this.recoveryAzureVMSize = recoveryAzureVMSize; + return this; + } + + /** + * Get the name of recovery virtual machine. + * + * @return the recoveryAzureVMName value + */ + public String recoveryAzureVMName() { + return this.recoveryAzureVMName; + } + + /** + * Set the name of recovery virtual machine. + * + * @param recoveryAzureVMName the recoveryAzureVMName value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withRecoveryAzureVMName(String recoveryAzureVMName) { + this.recoveryAzureVMName = recoveryAzureVMName; + return this; + } + + /** + * Get the recovery resource group. + * + * @return the recoveryAzureResourceGroupId value + */ + public String recoveryAzureResourceGroupId() { + return this.recoveryAzureResourceGroupId; + } + + /** + * Set the recovery resource group. + * + * @param recoveryAzureResourceGroupId the recoveryAzureResourceGroupId value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withRecoveryAzureResourceGroupId(String recoveryAzureResourceGroupId) { + this.recoveryAzureResourceGroupId = recoveryAzureResourceGroupId; + return this; + } + + /** + * Get the recovery cloud service. + * + * @return the recoveryCloudService value + */ + public String recoveryCloudService() { + return this.recoveryCloudService; + } + + /** + * Set the recovery cloud service. + * + * @param recoveryCloudService the recoveryCloudService value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withRecoveryCloudService(String recoveryCloudService) { + this.recoveryCloudService = recoveryCloudService; + return this; + } + + /** + * Get the recovery availability set. + * + * @return the recoveryAvailabilitySet value + */ + public String recoveryAvailabilitySet() { + return this.recoveryAvailabilitySet; + } + + /** + * Set the recovery availability set. + * + * @param recoveryAvailabilitySet the recoveryAvailabilitySet value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withRecoveryAvailabilitySet(String recoveryAvailabilitySet) { + this.recoveryAvailabilitySet = recoveryAvailabilitySet; + return this; + } + + /** + * Get the recovery virtual network. + * + * @return the selectedRecoveryAzureNetworkId value + */ + public String selectedRecoveryAzureNetworkId() { + return this.selectedRecoveryAzureNetworkId; + } + + /** + * Set the recovery virtual network. + * + * @param selectedRecoveryAzureNetworkId the selectedRecoveryAzureNetworkId value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withSelectedRecoveryAzureNetworkId(String selectedRecoveryAzureNetworkId) { + this.selectedRecoveryAzureNetworkId = selectedRecoveryAzureNetworkId; + return this; + } + + /** + * Get the virtual machine nic details. + * + * @return the vmNics value + */ + public List vmNics() { + return this.vmNics; + } + + /** + * Set the virtual machine nic details. + * + * @param vmNics the vmNics value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withVmNics(List vmNics) { + this.vmNics = vmNics; + return this; + } + + /** + * Get the synced configuration details. + * + * @return the vmSyncedConfigDetails value + */ + public AzureToAzureVmSyncedConfigDetails vmSyncedConfigDetails() { + return this.vmSyncedConfigDetails; + } + + /** + * Set the synced configuration details. + * + * @param vmSyncedConfigDetails the vmSyncedConfigDetails value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withVmSyncedConfigDetails(AzureToAzureVmSyncedConfigDetails vmSyncedConfigDetails) { + this.vmSyncedConfigDetails = vmSyncedConfigDetails; + return this; + } + + /** + * Get the percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. + * + * @return the monitoringPercentageCompletion value + */ + public Integer monitoringPercentageCompletion() { + return this.monitoringPercentageCompletion; + } + + /** + * Set the percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. + * + * @param monitoringPercentageCompletion the monitoringPercentageCompletion value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withMonitoringPercentageCompletion(Integer monitoringPercentageCompletion) { + this.monitoringPercentageCompletion = monitoringPercentageCompletion; + return this; + } + + /** + * Get the type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. + * + * @return the monitoringJobType value + */ + public String monitoringJobType() { + return this.monitoringJobType; + } + + /** + * Set the type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. + * + * @param monitoringJobType the monitoringJobType value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withMonitoringJobType(String monitoringJobType) { + this.monitoringJobType = monitoringJobType; + return this; + } + + /** + * Get the last heartbeat received from the source server. + * + * @return the lastHeartbeat value + */ + public DateTime lastHeartbeat() { + return this.lastHeartbeat; + } + + /** + * Set the last heartbeat received from the source server. + * + * @param lastHeartbeat the lastHeartbeat value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withLastHeartbeat(DateTime lastHeartbeat) { + this.lastHeartbeat = lastHeartbeat; + 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 A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withAgentVersion(String agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + /** + * Get a value indicating whether replication agent update is required. + * + * @return the isReplicationAgentUpdateRequired value + */ + public Boolean isReplicationAgentUpdateRequired() { + return this.isReplicationAgentUpdateRequired; + } + + /** + * Set a value indicating whether replication agent update is required. + * + * @param isReplicationAgentUpdateRequired the isReplicationAgentUpdateRequired value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withIsReplicationAgentUpdateRequired(Boolean isReplicationAgentUpdateRequired) { + this.isReplicationAgentUpdateRequired = isReplicationAgentUpdateRequired; + return this; + } + + /** + * Get the recovery fabric object Id. + * + * @return the recoveryFabricObjectId value + */ + public String recoveryFabricObjectId() { + return this.recoveryFabricObjectId; + } + + /** + * Set the recovery fabric object Id. + * + * @param recoveryFabricObjectId the recoveryFabricObjectId value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withRecoveryFabricObjectId(String recoveryFabricObjectId) { + this.recoveryFabricObjectId = recoveryFabricObjectId; + return this; + } + + /** + * Get the protection state for the vm. + * + * @return the vmProtectionState value + */ + public String vmProtectionState() { + return this.vmProtectionState; + } + + /** + * Set the protection state for the vm. + * + * @param vmProtectionState the vmProtectionState value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withVmProtectionState(String vmProtectionState) { + this.vmProtectionState = vmProtectionState; + return this; + } + + /** + * Get the protection state description for the vm. + * + * @return the vmProtectionStateDescription value + */ + public String vmProtectionStateDescription() { + return this.vmProtectionStateDescription; + } + + /** + * Set the protection state description for the vm. + * + * @param vmProtectionStateDescription the vmProtectionStateDescription value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withVmProtectionStateDescription(String vmProtectionStateDescription) { + this.vmProtectionStateDescription = vmProtectionStateDescription; + return this; + } + + /** + * Get an id associated with the PE that survives actions like switch protection which change the backing PE/CPE objects internally.The lifecycle id gets carried forward to have a link/continuity in being able to have an Id that denotes the "same" protected item even though other internal Ids/ARM Id might be changing. + * + * @return the lifecycleId value + */ + public String lifecycleId() { + return this.lifecycleId; + } + + /** + * Set an id associated with the PE that survives actions like switch protection which change the backing PE/CPE objects internally.The lifecycle id gets carried forward to have a link/continuity in being able to have an Id that denotes the "same" protected item even though other internal Ids/ARM Id might be changing. + * + * @param lifecycleId the lifecycleId value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withLifecycleId(String lifecycleId) { + this.lifecycleId = lifecycleId; + return this; + } + + /** + * Get the test failover fabric object Id. + * + * @return the testFailoverRecoveryFabricObjectId value + */ + public String testFailoverRecoveryFabricObjectId() { + return this.testFailoverRecoveryFabricObjectId; + } + + /** + * Set the test failover fabric object Id. + * + * @param testFailoverRecoveryFabricObjectId the testFailoverRecoveryFabricObjectId value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withTestFailoverRecoveryFabricObjectId(String testFailoverRecoveryFabricObjectId) { + this.testFailoverRecoveryFabricObjectId = testFailoverRecoveryFabricObjectId; + return this; + } + + /** + * Get the last RPO value in seconds. + * + * @return the rpoInSeconds value + */ + public Long rpoInSeconds() { + return this.rpoInSeconds; + } + + /** + * Set the last RPO value in seconds. + * + * @param rpoInSeconds the rpoInSeconds value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withRpoInSeconds(Long rpoInSeconds) { + this.rpoInSeconds = rpoInSeconds; + return this; + } + + /** + * Get the time (in UTC) when the last RPO value was calculated by Protection Service. + * + * @return the lastRpoCalculatedTime value + */ + public DateTime lastRpoCalculatedTime() { + return this.lastRpoCalculatedTime; + } + + /** + * Set the time (in UTC) when the last RPO value was calculated by Protection Service. + * + * @param lastRpoCalculatedTime the lastRpoCalculatedTime value to set + * @return the A2AReplicationDetails object itself. + */ + public A2AReplicationDetails withLastRpoCalculatedTime(DateTime lastRpoCalculatedTime) { + this.lastRpoCalculatedTime = lastRpoCalculatedTime; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AReprotectInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AReprotectInput.java new file mode 100644 index 0000000000000..0e2aea6857553 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AReprotectInput.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Azure specific reprotect input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("A2A") +public class A2AReprotectInput extends ReverseReplicationProviderSpecificInput { + /** + * The recovery container Id. + */ + @JsonProperty(value = "recoveryContainerId") + private String recoveryContainerId; + + /** + * The list of vm disk details. + */ + @JsonProperty(value = "vmDisks") + private List vmDisks; + + /** + * The recovery resource group Id. Valid for V2 scenarios. + */ + @JsonProperty(value = "recoveryResourceGroupId") + private String recoveryResourceGroupId; + + /** + * The recovery cloud service Id. Valid for V1 scenarios. + */ + @JsonProperty(value = "recoveryCloudServiceId") + private String recoveryCloudServiceId; + + /** + * The recovery availability set. + */ + @JsonProperty(value = "recoveryAvailabilitySetId") + private String recoveryAvailabilitySetId; + + /** + * The Policy Id. + */ + @JsonProperty(value = "policyId") + private String policyId; + + /** + * Get the recovery container Id. + * + * @return the recoveryContainerId value + */ + public String recoveryContainerId() { + return this.recoveryContainerId; + } + + /** + * Set the recovery container Id. + * + * @param recoveryContainerId the recoveryContainerId value to set + * @return the A2AReprotectInput object itself. + */ + public A2AReprotectInput withRecoveryContainerId(String recoveryContainerId) { + this.recoveryContainerId = recoveryContainerId; + return this; + } + + /** + * Get the list of vm disk details. + * + * @return the vmDisks value + */ + public List vmDisks() { + return this.vmDisks; + } + + /** + * Set the list of vm disk details. + * + * @param vmDisks the vmDisks value to set + * @return the A2AReprotectInput object itself. + */ + public A2AReprotectInput withVmDisks(List vmDisks) { + this.vmDisks = vmDisks; + return this; + } + + /** + * Get the recovery resource group Id. Valid for V2 scenarios. + * + * @return the recoveryResourceGroupId value + */ + public String recoveryResourceGroupId() { + return this.recoveryResourceGroupId; + } + + /** + * Set the recovery resource group Id. Valid for V2 scenarios. + * + * @param recoveryResourceGroupId the recoveryResourceGroupId value to set + * @return the A2AReprotectInput object itself. + */ + public A2AReprotectInput withRecoveryResourceGroupId(String recoveryResourceGroupId) { + this.recoveryResourceGroupId = recoveryResourceGroupId; + return this; + } + + /** + * Get the recovery cloud service Id. Valid for V1 scenarios. + * + * @return the recoveryCloudServiceId value + */ + public String recoveryCloudServiceId() { + return this.recoveryCloudServiceId; + } + + /** + * Set the recovery cloud service Id. Valid for V1 scenarios. + * + * @param recoveryCloudServiceId the recoveryCloudServiceId value to set + * @return the A2AReprotectInput object itself. + */ + public A2AReprotectInput withRecoveryCloudServiceId(String recoveryCloudServiceId) { + this.recoveryCloudServiceId = recoveryCloudServiceId; + return this; + } + + /** + * Get the recovery availability set. + * + * @return the recoveryAvailabilitySetId value + */ + public String recoveryAvailabilitySetId() { + return this.recoveryAvailabilitySetId; + } + + /** + * Set the recovery availability set. + * + * @param recoveryAvailabilitySetId the recoveryAvailabilitySetId value to set + * @return the A2AReprotectInput object itself. + */ + public A2AReprotectInput withRecoveryAvailabilitySetId(String recoveryAvailabilitySetId) { + this.recoveryAvailabilitySetId = recoveryAvailabilitySetId; + return this; + } + + /** + * Get the Policy Id. + * + * @return the policyId value + */ + public String policyId() { + return this.policyId; + } + + /** + * Set the Policy Id. + * + * @param policyId the policyId value to set + * @return the A2AReprotectInput object itself. + */ + public A2AReprotectInput withPolicyId(String policyId) { + this.policyId = policyId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2ARpRecoveryPointType.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2ARpRecoveryPointType.java new file mode 100644 index 0000000000000..2f64e2622d96c --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2ARpRecoveryPointType.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for A2ARpRecoveryPointType. + */ +public enum A2ARpRecoveryPointType { + /** Enum value Latest. */ + LATEST("Latest"), + + /** Enum value LatestApplicationConsistent. */ + LATEST_APPLICATION_CONSISTENT("LatestApplicationConsistent"), + + /** Enum value LatestCrashConsistent. */ + LATEST_CRASH_CONSISTENT("LatestCrashConsistent"), + + /** Enum value LatestProcessed. */ + LATEST_PROCESSED("LatestProcessed"); + + /** The actual serialized value for a A2ARpRecoveryPointType instance. */ + private String value; + + A2ARpRecoveryPointType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a A2ARpRecoveryPointType instance. + * + * @param value the serialized value to parse. + * @return the parsed A2ARpRecoveryPointType object, or null if unable to parse. + */ + @JsonCreator + public static A2ARpRecoveryPointType fromString(String value) { + A2ARpRecoveryPointType[] items = A2ARpRecoveryPointType.values(); + for (A2ARpRecoveryPointType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2ASwitchProtectionInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2ASwitchProtectionInput.java new file mode 100644 index 0000000000000..09833e27a49cf --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2ASwitchProtectionInput.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * A2A specific switch protection input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("A2A") +public class A2ASwitchProtectionInput extends SwitchProtectionProviderSpecificInput { + /** + * The recovery container Id. + */ + @JsonProperty(value = "recoveryContainerId") + private String recoveryContainerId; + + /** + * The list of vm disk details. + */ + @JsonProperty(value = "vmDisks") + private List vmDisks; + + /** + * The list of vm managed disk details. + */ + @JsonProperty(value = "vmManagedDisks") + private List vmManagedDisks; + + /** + * The recovery resource group Id. Valid for V2 scenarios. + */ + @JsonProperty(value = "recoveryResourceGroupId") + private String recoveryResourceGroupId; + + /** + * The recovery cloud service Id. Valid for V1 scenarios. + */ + @JsonProperty(value = "recoveryCloudServiceId") + private String recoveryCloudServiceId; + + /** + * The recovery availability set. + */ + @JsonProperty(value = "recoveryAvailabilitySetId") + private String recoveryAvailabilitySetId; + + /** + * The Policy Id. + */ + @JsonProperty(value = "policyId") + private String policyId; + + /** + * Get the recovery container Id. + * + * @return the recoveryContainerId value + */ + public String recoveryContainerId() { + return this.recoveryContainerId; + } + + /** + * Set the recovery container Id. + * + * @param recoveryContainerId the recoveryContainerId value to set + * @return the A2ASwitchProtectionInput object itself. + */ + public A2ASwitchProtectionInput withRecoveryContainerId(String recoveryContainerId) { + this.recoveryContainerId = recoveryContainerId; + return this; + } + + /** + * Get the list of vm disk details. + * + * @return the vmDisks value + */ + public List vmDisks() { + return this.vmDisks; + } + + /** + * Set the list of vm disk details. + * + * @param vmDisks the vmDisks value to set + * @return the A2ASwitchProtectionInput object itself. + */ + public A2ASwitchProtectionInput withVmDisks(List vmDisks) { + this.vmDisks = vmDisks; + return this; + } + + /** + * Get the list of vm managed disk details. + * + * @return the vmManagedDisks value + */ + public List vmManagedDisks() { + return this.vmManagedDisks; + } + + /** + * Set the list of vm managed disk details. + * + * @param vmManagedDisks the vmManagedDisks value to set + * @return the A2ASwitchProtectionInput object itself. + */ + public A2ASwitchProtectionInput withVmManagedDisks(List vmManagedDisks) { + this.vmManagedDisks = vmManagedDisks; + return this; + } + + /** + * Get the recovery resource group Id. Valid for V2 scenarios. + * + * @return the recoveryResourceGroupId value + */ + public String recoveryResourceGroupId() { + return this.recoveryResourceGroupId; + } + + /** + * Set the recovery resource group Id. Valid for V2 scenarios. + * + * @param recoveryResourceGroupId the recoveryResourceGroupId value to set + * @return the A2ASwitchProtectionInput object itself. + */ + public A2ASwitchProtectionInput withRecoveryResourceGroupId(String recoveryResourceGroupId) { + this.recoveryResourceGroupId = recoveryResourceGroupId; + return this; + } + + /** + * Get the recovery cloud service Id. Valid for V1 scenarios. + * + * @return the recoveryCloudServiceId value + */ + public String recoveryCloudServiceId() { + return this.recoveryCloudServiceId; + } + + /** + * Set the recovery cloud service Id. Valid for V1 scenarios. + * + * @param recoveryCloudServiceId the recoveryCloudServiceId value to set + * @return the A2ASwitchProtectionInput object itself. + */ + public A2ASwitchProtectionInput withRecoveryCloudServiceId(String recoveryCloudServiceId) { + this.recoveryCloudServiceId = recoveryCloudServiceId; + return this; + } + + /** + * Get the recovery availability set. + * + * @return the recoveryAvailabilitySetId value + */ + public String recoveryAvailabilitySetId() { + return this.recoveryAvailabilitySetId; + } + + /** + * Set the recovery availability set. + * + * @param recoveryAvailabilitySetId the recoveryAvailabilitySetId value to set + * @return the A2ASwitchProtectionInput object itself. + */ + public A2ASwitchProtectionInput withRecoveryAvailabilitySetId(String recoveryAvailabilitySetId) { + this.recoveryAvailabilitySetId = recoveryAvailabilitySetId; + return this; + } + + /** + * Get the Policy Id. + * + * @return the policyId value + */ + public String policyId() { + return this.policyId; + } + + /** + * Set the Policy Id. + * + * @param policyId the policyId value to set + * @return the A2ASwitchProtectionInput object itself. + */ + public A2ASwitchProtectionInput withPolicyId(String policyId) { + this.policyId = policyId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AUpdateReplicationProtectedItemInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AUpdateReplicationProtectedItemInput.java new file mode 100644 index 0000000000000..2b0a7ee05b7e4 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AUpdateReplicationProtectedItemInput.java @@ -0,0 +1,73 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * InMage Azure V2 input to update replication protected item. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("A2A") +public class A2AUpdateReplicationProtectedItemInput extends UpdateReplicationProtectedItemProviderInput { + /** + * The target cloud service ARM Id (for V1). + */ + @JsonProperty(value = "recoveryCloudServiceId") + private String recoveryCloudServiceId; + + /** + * The target resource group ARM Id (for V2). + */ + @JsonProperty(value = "recoveryResourceGroupId") + private String recoveryResourceGroupId; + + /** + * Get the target cloud service ARM Id (for V1). + * + * @return the recoveryCloudServiceId value + */ + public String recoveryCloudServiceId() { + return this.recoveryCloudServiceId; + } + + /** + * Set the target cloud service ARM Id (for V1). + * + * @param recoveryCloudServiceId the recoveryCloudServiceId value to set + * @return the A2AUpdateReplicationProtectedItemInput object itself. + */ + public A2AUpdateReplicationProtectedItemInput withRecoveryCloudServiceId(String recoveryCloudServiceId) { + this.recoveryCloudServiceId = recoveryCloudServiceId; + return this; + } + + /** + * Get the target resource group ARM Id (for V2). + * + * @return the recoveryResourceGroupId value + */ + public String recoveryResourceGroupId() { + return this.recoveryResourceGroupId; + } + + /** + * Set the target resource group ARM Id (for V2). + * + * @param recoveryResourceGroupId the recoveryResourceGroupId value to set + * @return the A2AUpdateReplicationProtectedItemInput object itself. + */ + public A2AUpdateReplicationProtectedItemInput withRecoveryResourceGroupId(String recoveryResourceGroupId) { + this.recoveryResourceGroupId = recoveryResourceGroupId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AVmDiskInputDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AVmDiskInputDetails.java new file mode 100644 index 0000000000000..bd0d2a7128352 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AVmDiskInputDetails.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure VM disk input details. + */ +public class A2AVmDiskInputDetails { + /** + * The disk Uri. + */ + @JsonProperty(value = "diskUri") + private String diskUri; + + /** + * The recovery VHD storage account Id. + */ + @JsonProperty(value = "recoveryAzureStorageAccountId") + private String recoveryAzureStorageAccountId; + + /** + * The primary staging storage account Id. + */ + @JsonProperty(value = "primaryStagingAzureStorageAccountId") + private String primaryStagingAzureStorageAccountId; + + /** + * Get the disk Uri. + * + * @return the diskUri value + */ + public String diskUri() { + return this.diskUri; + } + + /** + * Set the disk Uri. + * + * @param diskUri the diskUri value to set + * @return the A2AVmDiskInputDetails object itself. + */ + public A2AVmDiskInputDetails withDiskUri(String diskUri) { + this.diskUri = diskUri; + return this; + } + + /** + * Get the recovery VHD storage account Id. + * + * @return the recoveryAzureStorageAccountId value + */ + public String recoveryAzureStorageAccountId() { + return this.recoveryAzureStorageAccountId; + } + + /** + * Set the recovery VHD storage account Id. + * + * @param recoveryAzureStorageAccountId the recoveryAzureStorageAccountId value to set + * @return the A2AVmDiskInputDetails object itself. + */ + public A2AVmDiskInputDetails withRecoveryAzureStorageAccountId(String recoveryAzureStorageAccountId) { + this.recoveryAzureStorageAccountId = recoveryAzureStorageAccountId; + return this; + } + + /** + * Get the primary staging storage account Id. + * + * @return the primaryStagingAzureStorageAccountId value + */ + public String primaryStagingAzureStorageAccountId() { + return this.primaryStagingAzureStorageAccountId; + } + + /** + * Set the primary staging storage account Id. + * + * @param primaryStagingAzureStorageAccountId the primaryStagingAzureStorageAccountId value to set + * @return the A2AVmDiskInputDetails object itself. + */ + public A2AVmDiskInputDetails withPrimaryStagingAzureStorageAccountId(String primaryStagingAzureStorageAccountId) { + this.primaryStagingAzureStorageAccountId = primaryStagingAzureStorageAccountId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AVmManagedDiskInputDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AVmManagedDiskInputDetails.java new file mode 100644 index 0000000000000..69b1657ebd3c2 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/A2AVmManagedDiskInputDetails.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure VM managed disk input details. + */ +public class A2AVmManagedDiskInputDetails { + /** + * The disk Id. + */ + @JsonProperty(value = "diskId") + private String diskId; + + /** + * The primary staging storage account Arm Id. + */ + @JsonProperty(value = "primaryStagingAzureStorageAccountId") + private String primaryStagingAzureStorageAccountId; + + /** + * The target resource group Arm Id. + */ + @JsonProperty(value = "recoveryResourceGroupId") + private String recoveryResourceGroupId; + + /** + * Get the disk Id. + * + * @return the diskId value + */ + public String diskId() { + return this.diskId; + } + + /** + * Set the disk Id. + * + * @param diskId the diskId value to set + * @return the A2AVmManagedDiskInputDetails object itself. + */ + public A2AVmManagedDiskInputDetails withDiskId(String diskId) { + this.diskId = diskId; + return this; + } + + /** + * Get the primary staging storage account Arm Id. + * + * @return the primaryStagingAzureStorageAccountId value + */ + public String primaryStagingAzureStorageAccountId() { + return this.primaryStagingAzureStorageAccountId; + } + + /** + * Set the primary staging storage account Arm Id. + * + * @param primaryStagingAzureStorageAccountId the primaryStagingAzureStorageAccountId value to set + * @return the A2AVmManagedDiskInputDetails object itself. + */ + public A2AVmManagedDiskInputDetails withPrimaryStagingAzureStorageAccountId(String primaryStagingAzureStorageAccountId) { + this.primaryStagingAzureStorageAccountId = primaryStagingAzureStorageAccountId; + return this; + } + + /** + * Get the target resource group Arm Id. + * + * @return the recoveryResourceGroupId value + */ + public String recoveryResourceGroupId() { + return this.recoveryResourceGroupId; + } + + /** + * Set the target resource group Arm Id. + * + * @param recoveryResourceGroupId the recoveryResourceGroupId value to set + * @return the A2AVmManagedDiskInputDetails object itself. + */ + public A2AVmManagedDiskInputDetails withRecoveryResourceGroupId(String recoveryResourceGroupId) { + this.recoveryResourceGroupId = recoveryResourceGroupId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ARMException.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ARMException.java new file mode 100644 index 0000000000000..b51c5cb236fb7 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ARMException.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * ARM inner exception class. + */ +public class ARMException { + /** + * Gets HTTP status code for the error. + */ + @JsonProperty(value = "code") + private String code; + + /** + * Gets exception message. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Gets exception target. + */ + @JsonProperty(value = "target") + private String target; + + /** + * Gets service based error details. + */ + @JsonProperty(value = "details") + private List details; + + /** + * Gets private data for service debugging. + */ + @JsonProperty(value = "innererror") + private ARMInnerError innererror; + + /** + * Get gets HTTP status code for the error. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set gets HTTP status code for the error. + * + * @param code the code value to set + * @return the ARMException object itself. + */ + public ARMException withCode(String code) { + this.code = code; + return this; + } + + /** + * Get gets exception message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set gets exception message. + * + * @param message the message value to set + * @return the ARMException object itself. + */ + public ARMException withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get gets exception target. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Set gets exception target. + * + * @param target the target value to set + * @return the ARMException object itself. + */ + public ARMException withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get gets service based error details. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set gets service based error details. + * + * @param details the details value to set + * @return the ARMException object itself. + */ + public ARMException withDetails(List details) { + this.details = details; + return this; + } + + /** + * Get gets private data for service debugging. + * + * @return the innererror value + */ + public ARMInnerError innererror() { + return this.innererror; + } + + /** + * Set gets private data for service debugging. + * + * @param innererror the innererror value to set + * @return the ARMException object itself. + */ + public ARMException withInnererror(ARMInnerError innererror) { + this.innererror = innererror; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ARMExceptionDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ARMExceptionDetails.java new file mode 100644 index 0000000000000..74b8656dab219 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ARMExceptionDetails.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Service based exception details. + */ +public class ARMExceptionDetails { + /** + * Gets service error code. + */ + @JsonProperty(value = "code") + private String code; + + /** + * Gets error message. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Gets possible cause for error. + */ + @JsonProperty(value = "possibleCauses") + private String possibleCauses; + + /** + * Gets recommended action for the error. + */ + @JsonProperty(value = "recommendedAction") + private String recommendedAction; + + /** + * Gets the client request Id for the session. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /** + * Gets the activity Id for the session. + */ + @JsonProperty(value = "activityId") + private String activityId; + + /** + * Gets exception target. + */ + @JsonProperty(value = "target") + private String target; + + /** + * Get gets service error code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set gets service error code. + * + * @param code the code value to set + * @return the ARMExceptionDetails object itself. + */ + public ARMExceptionDetails withCode(String code) { + this.code = code; + return this; + } + + /** + * Get gets error message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set gets error message. + * + * @param message the message value to set + * @return the ARMExceptionDetails object itself. + */ + public ARMExceptionDetails withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get gets possible cause for error. + * + * @return the possibleCauses value + */ + public String possibleCauses() { + return this.possibleCauses; + } + + /** + * Set gets possible cause for error. + * + * @param possibleCauses the possibleCauses value to set + * @return the ARMExceptionDetails object itself. + */ + public ARMExceptionDetails withPossibleCauses(String possibleCauses) { + this.possibleCauses = possibleCauses; + return this; + } + + /** + * Get gets recommended action for the error. + * + * @return the recommendedAction value + */ + public String recommendedAction() { + return this.recommendedAction; + } + + /** + * Set gets recommended action for the error. + * + * @param recommendedAction the recommendedAction value to set + * @return the ARMExceptionDetails object itself. + */ + public ARMExceptionDetails withRecommendedAction(String recommendedAction) { + this.recommendedAction = recommendedAction; + return this; + } + + /** + * Get gets the client request Id for the session. + * + * @return the clientRequestId value + */ + public String clientRequestId() { + return this.clientRequestId; + } + + /** + * Set gets the client request Id for the session. + * + * @param clientRequestId the clientRequestId value to set + * @return the ARMExceptionDetails object itself. + */ + public ARMExceptionDetails withClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get gets the activity Id for the session. + * + * @return the activityId value + */ + public String activityId() { + return this.activityId; + } + + /** + * Set gets the activity Id for the session. + * + * @param activityId the activityId value to set + * @return the ARMExceptionDetails object itself. + */ + public ARMExceptionDetails withActivityId(String activityId) { + this.activityId = activityId; + return this; + } + + /** + * Get gets exception target. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Set gets exception target. + * + * @param target the target value to set + * @return the ARMExceptionDetails object itself. + */ + public ARMExceptionDetails withTarget(String target) { + this.target = target; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ARMInnerError.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ARMInnerError.java new file mode 100644 index 0000000000000..b89f77f103e1b --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ARMInnerError.java @@ -0,0 +1,407 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * ARM internal error class for providing additional debug data. + */ +public class ARMInnerError { + /** + * Gets complete stack trace of the exception. + */ + @JsonProperty(value = "trace") + private String trace; + + /** + * Gets exception source. + */ + @JsonProperty(value = "source") + private String source; + + /** + * Gets data related to method which threw the exception. + */ + @JsonProperty(value = "methodStatus") + private MethodCallStatus methodStatus; + + /** + * Gets cloud Id in exception. + */ + @JsonProperty(value = "cloudId") + private String cloudId; + + /** + * Gets hyperV host ID. + */ + @JsonProperty(value = "hVHostId") + private String hVHostId; + + /** + * Gets hyperV cluster Id. + */ + @JsonProperty(value = "hVClusterId") + private String hVClusterId; + + /** + * Gets network Id. + */ + @JsonProperty(value = "networkId") + private String networkId; + + /** + * Gets Vm Id. + */ + @JsonProperty(value = "vmId") + private String vmId; + + /** + * Gets Fabric Id. + */ + @JsonProperty(value = "fabricId") + private String fabricId; + + /** + * Gets Live Id of the caller. + */ + @JsonProperty(value = "liveId") + private String liveId; + + /** + * Gets container Id of the caller. + */ + @JsonProperty(value = "containerId") + private String containerId; + + /** + * Gets resource id used in the call. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * Gets caller resource name. + */ + @JsonProperty(value = "resourceName") + private String resourceName; + + /** + * Gets subscription Id. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /** + * Gets serialized SRS log context. + */ + @JsonProperty(value = "serializedSRSLogContext") + private String serializedSRSLogContext; + + /** + * Get gets complete stack trace of the exception. + * + * @return the trace value + */ + public String trace() { + return this.trace; + } + + /** + * Set gets complete stack trace of the exception. + * + * @param trace the trace value to set + * @return the ARMInnerError object itself. + */ + public ARMInnerError withTrace(String trace) { + this.trace = trace; + return this; + } + + /** + * Get gets exception source. + * + * @return the source value + */ + public String source() { + return this.source; + } + + /** + * Set gets exception source. + * + * @param source the source value to set + * @return the ARMInnerError object itself. + */ + public ARMInnerError withSource(String source) { + this.source = source; + return this; + } + + /** + * Get gets data related to method which threw the exception. + * + * @return the methodStatus value + */ + public MethodCallStatus methodStatus() { + return this.methodStatus; + } + + /** + * Set gets data related to method which threw the exception. + * + * @param methodStatus the methodStatus value to set + * @return the ARMInnerError object itself. + */ + public ARMInnerError withMethodStatus(MethodCallStatus methodStatus) { + this.methodStatus = methodStatus; + return this; + } + + /** + * Get gets cloud Id in exception. + * + * @return the cloudId value + */ + public String cloudId() { + return this.cloudId; + } + + /** + * Set gets cloud Id in exception. + * + * @param cloudId the cloudId value to set + * @return the ARMInnerError object itself. + */ + public ARMInnerError withCloudId(String cloudId) { + this.cloudId = cloudId; + return this; + } + + /** + * Get gets hyperV host ID. + * + * @return the hVHostId value + */ + public String hVHostId() { + return this.hVHostId; + } + + /** + * Set gets hyperV host ID. + * + * @param hVHostId the hVHostId value to set + * @return the ARMInnerError object itself. + */ + public ARMInnerError withHVHostId(String hVHostId) { + this.hVHostId = hVHostId; + return this; + } + + /** + * Get gets hyperV cluster Id. + * + * @return the hVClusterId value + */ + public String hVClusterId() { + return this.hVClusterId; + } + + /** + * Set gets hyperV cluster Id. + * + * @param hVClusterId the hVClusterId value to set + * @return the ARMInnerError object itself. + */ + public ARMInnerError withHVClusterId(String hVClusterId) { + this.hVClusterId = hVClusterId; + return this; + } + + /** + * Get gets network Id. + * + * @return the networkId value + */ + public String networkId() { + return this.networkId; + } + + /** + * Set gets network Id. + * + * @param networkId the networkId value to set + * @return the ARMInnerError object itself. + */ + public ARMInnerError withNetworkId(String networkId) { + this.networkId = networkId; + return this; + } + + /** + * Get gets Vm Id. + * + * @return the vmId value + */ + public String vmId() { + return this.vmId; + } + + /** + * Set gets Vm Id. + * + * @param vmId the vmId value to set + * @return the ARMInnerError object itself. + */ + public ARMInnerError withVmId(String vmId) { + this.vmId = vmId; + return this; + } + + /** + * Get gets Fabric Id. + * + * @return the fabricId value + */ + public String fabricId() { + return this.fabricId; + } + + /** + * Set gets Fabric Id. + * + * @param fabricId the fabricId value to set + * @return the ARMInnerError object itself. + */ + public ARMInnerError withFabricId(String fabricId) { + this.fabricId = fabricId; + return this; + } + + /** + * Get gets Live Id of the caller. + * + * @return the liveId value + */ + public String liveId() { + return this.liveId; + } + + /** + * Set gets Live Id of the caller. + * + * @param liveId the liveId value to set + * @return the ARMInnerError object itself. + */ + public ARMInnerError withLiveId(String liveId) { + this.liveId = liveId; + return this; + } + + /** + * Get gets container Id of the caller. + * + * @return the containerId value + */ + public String containerId() { + return this.containerId; + } + + /** + * Set gets container Id of the caller. + * + * @param containerId the containerId value to set + * @return the ARMInnerError object itself. + */ + public ARMInnerError withContainerId(String containerId) { + this.containerId = containerId; + return this; + } + + /** + * Get gets resource id used in the call. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set gets resource id used in the call. + * + * @param resourceId the resourceId value to set + * @return the ARMInnerError object itself. + */ + public ARMInnerError withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get gets caller resource name. + * + * @return the resourceName value + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Set gets caller resource name. + * + * @param resourceName the resourceName value to set + * @return the ARMInnerError object itself. + */ + public ARMInnerError withResourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + /** + * Get gets subscription Id. + * + * @return the subscriptionId value + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set gets subscription Id. + * + * @param subscriptionId the subscriptionId value to set + * @return the ARMInnerError object itself. + */ + public ARMInnerError withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get gets serialized SRS log context. + * + * @return the serializedSRSLogContext value + */ + public String serializedSRSLogContext() { + return this.serializedSRSLogContext; + } + + /** + * Set gets serialized SRS log context. + * + * @param serializedSRSLogContext the serializedSRSLogContext value to set + * @return the ARMInnerError object itself. + */ + public ARMInnerError withSerializedSRSLogContext(String serializedSRSLogContext) { + this.serializedSRSLogContext = serializedSRSLogContext; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ASRTask.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ASRTask.java new file mode 100644 index 0000000000000..1b3fe248d7fea --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ASRTask.java @@ -0,0 +1,335 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Task of the Job. + */ +public class ASRTask { + /** + * The Id. + */ + @JsonProperty(value = "taskId") + private String taskId; + + /** + * The unique Task name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The start time. + */ + @JsonProperty(value = "startTime") + private DateTime startTime; + + /** + * The end time. + */ + @JsonProperty(value = "endTime") + private DateTime endTime; + + /** + * The state/actions applicable on this task. + */ + @JsonProperty(value = "allowedActions") + private List allowedActions; + + /** + * The name. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * The State. It is one of these values - NotStarted, InProgress, + * Succeeded, Failed, Cancelled, Suspended or Other. + */ + @JsonProperty(value = "state") + private String state; + + /** + * The description of the task state. For example - For Succeeded state, + * description can be Completed, PartiallySucceeded, + * CompletedWithInformation or Skipped. + */ + @JsonProperty(value = "stateDescription") + private String stateDescription; + + /** + * The type of task. Details in CustomDetails property depend on this type. + */ + @JsonProperty(value = "taskType") + private String taskType; + + /** + * The custom task details based on the task type. + */ + @JsonProperty(value = "customDetails") + private TaskTypeDetails customDetails; + + /** + * The custom task details based on the task type, if the task type is + * GroupTaskDetails or one of the types derived from it. + */ + @JsonProperty(value = "groupTaskCustomDetails") + private GroupTaskDetails groupTaskCustomDetails; + + /** + * The task error details. + */ + @JsonProperty(value = "errors") + private List errors; + + /** + * Get the Id. + * + * @return the taskId value + */ + public String taskId() { + return this.taskId; + } + + /** + * Set the Id. + * + * @param taskId the taskId value to set + * @return the ASRTask object itself. + */ + public ASRTask withTaskId(String taskId) { + this.taskId = taskId; + return this; + } + + /** + * Get the unique Task name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unique Task name. + * + * @param name the name value to set + * @return the ASRTask object itself. + */ + public ASRTask withName(String name) { + this.name = name; + return this; + } + + /** + * Get the start time. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the start time. + * + * @param startTime the startTime value to set + * @return the ASRTask object itself. + */ + public ASRTask withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the end time. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set the end time. + * + * @param endTime the endTime value to set + * @return the ASRTask object itself. + */ + public ASRTask withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the state/actions applicable on this task. + * + * @return the allowedActions value + */ + public List allowedActions() { + return this.allowedActions; + } + + /** + * Set the state/actions applicable on this task. + * + * @param allowedActions the allowedActions value to set + * @return the ASRTask object itself. + */ + public ASRTask withAllowedActions(List allowedActions) { + this.allowedActions = allowedActions; + return this; + } + + /** + * Get the name. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the name. + * + * @param friendlyName the friendlyName value to set + * @return the ASRTask object itself. + */ + public ASRTask withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the State. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Set the State. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. + * + * @param state the state value to set + * @return the ASRTask object itself. + */ + public ASRTask withState(String state) { + this.state = state; + return this; + } + + /** + * Get the description of the task state. For example - For Succeeded state, description can be Completed, PartiallySucceeded, CompletedWithInformation or Skipped. + * + * @return the stateDescription value + */ + public String stateDescription() { + return this.stateDescription; + } + + /** + * Set the description of the task state. For example - For Succeeded state, description can be Completed, PartiallySucceeded, CompletedWithInformation or Skipped. + * + * @param stateDescription the stateDescription value to set + * @return the ASRTask object itself. + */ + public ASRTask withStateDescription(String stateDescription) { + this.stateDescription = stateDescription; + return this; + } + + /** + * Get the type of task. Details in CustomDetails property depend on this type. + * + * @return the taskType value + */ + public String taskType() { + return this.taskType; + } + + /** + * Set the type of task. Details in CustomDetails property depend on this type. + * + * @param taskType the taskType value to set + * @return the ASRTask object itself. + */ + public ASRTask withTaskType(String taskType) { + this.taskType = taskType; + return this; + } + + /** + * Get the custom task details based on the task type. + * + * @return the customDetails value + */ + public TaskTypeDetails customDetails() { + return this.customDetails; + } + + /** + * Set the custom task details based on the task type. + * + * @param customDetails the customDetails value to set + * @return the ASRTask object itself. + */ + public ASRTask withCustomDetails(TaskTypeDetails customDetails) { + this.customDetails = customDetails; + return this; + } + + /** + * Get the custom task details based on the task type, if the task type is GroupTaskDetails or one of the types derived from it. + * + * @return the groupTaskCustomDetails value + */ + public GroupTaskDetails groupTaskCustomDetails() { + return this.groupTaskCustomDetails; + } + + /** + * Set the custom task details based on the task type, if the task type is GroupTaskDetails or one of the types derived from it. + * + * @param groupTaskCustomDetails the groupTaskCustomDetails value to set + * @return the ASRTask object itself. + */ + public ASRTask withGroupTaskCustomDetails(GroupTaskDetails groupTaskCustomDetails) { + this.groupTaskCustomDetails = groupTaskCustomDetails; + return this; + } + + /** + * Get the task error details. + * + * @return the errors value + */ + public List errors() { + return this.errors; + } + + /** + * Set the task error details. + * + * @param errors the errors value to set + * @return the ASRTask object itself. + */ + public ASRTask withErrors(List errors) { + this.errors = errors; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AddVCenterRequest.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AddVCenterRequest.java new file mode 100644 index 0000000000000..8fe9e8528814e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AddVCenterRequest.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input required to add vCenter. + */ +public class AddVCenterRequest { + /** + * The properties of an add vCenter request. + */ + @JsonProperty(value = "properties") + private AddVCenterRequestProperties properties; + + /** + * Get the properties of an add vCenter request. + * + * @return the properties value + */ + public AddVCenterRequestProperties properties() { + return this.properties; + } + + /** + * Set the properties of an add vCenter request. + * + * @param properties the properties value to set + * @return the AddVCenterRequest object itself. + */ + public AddVCenterRequest withProperties(AddVCenterRequestProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AddVCenterRequestProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AddVCenterRequestProperties.java new file mode 100644 index 0000000000000..fc99ef584baee --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AddVCenterRequestProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of an add vCenter request. + */ +public class AddVCenterRequestProperties { + /** + * The friendly name of the vCenter. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * The IP address of the vCenter to be discovered. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * The process server Id from where the discovery is orchestrated. + */ + @JsonProperty(value = "processServerId") + private String processServerId; + + /** + * The port number for discovery. + */ + @JsonProperty(value = "port") + private String port; + + /** + * The account Id which has privileges to discover the vCenter. + */ + @JsonProperty(value = "runAsAccountId") + private String runAsAccountId; + + /** + * Get the friendly name of the vCenter. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the friendly name of the vCenter. + * + * @param friendlyName the friendlyName value to set + * @return the AddVCenterRequestProperties object itself. + */ + public AddVCenterRequestProperties withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the IP address of the vCenter to be discovered. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the IP address of the vCenter to be discovered. + * + * @param ipAddress the ipAddress value to set + * @return the AddVCenterRequestProperties object itself. + */ + public AddVCenterRequestProperties withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the process server Id from where the discovery is orchestrated. + * + * @return the processServerId value + */ + public String processServerId() { + return this.processServerId; + } + + /** + * Set the process server Id from where the discovery is orchestrated. + * + * @param processServerId the processServerId value to set + * @return the AddVCenterRequestProperties object itself. + */ + public AddVCenterRequestProperties withProcessServerId(String processServerId) { + this.processServerId = processServerId; + return this; + } + + /** + * Get the port number for discovery. + * + * @return the port value + */ + public String port() { + return this.port; + } + + /** + * Set the port number for discovery. + * + * @param port the port value to set + * @return the AddVCenterRequestProperties object itself. + */ + public AddVCenterRequestProperties withPort(String port) { + this.port = port; + return this; + } + + /** + * Get the account Id which has privileges to discover the vCenter. + * + * @return the runAsAccountId value + */ + public String runAsAccountId() { + return this.runAsAccountId; + } + + /** + * Set the account Id which has privileges to discover the vCenter. + * + * @param runAsAccountId the runAsAccountId value to set + * @return the AddVCenterRequestProperties object itself. + */ + public AddVCenterRequestProperties withRunAsAccountId(String runAsAccountId) { + this.runAsAccountId = runAsAccountId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Alert.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Alert.java new file mode 100644 index 0000000000000..0b53441533744 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Alert.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.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.AlertInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; + +/** + * Type representing Alert. + */ +public interface Alert extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + AlertProperties properties(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the Alert definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithVault, DefinitionStages.WithCreate { + } + + /** + * Grouping of Alert definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Alert definition. + */ + interface Blank extends WithVault { + } + + /** + * The stage of the alert definition allowing to specify Vault. + */ + interface WithVault { + /** + * Specifies . + */ + WithCreate withExistingVault(); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a Alert update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable { + } + + /** + * Grouping of Alert update stages. + */ + interface UpdateStages { + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AlertProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AlertProperties.java new file mode 100644 index 0000000000000..35490f58eee3e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AlertProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The proprties of an alert. + */ +public class AlertProperties { + /** + * A value indicating whether to send email to subscription administrator. + */ + @JsonProperty(value = "sendToOwners") + private String sendToOwners; + + /** + * The custom email address for sending emails. + */ + @JsonProperty(value = "customEmailAddresses") + private List customEmailAddresses; + + /** + * The locale for the email notification. + */ + @JsonProperty(value = "locale") + private String locale; + + /** + * Get a value indicating whether to send email to subscription administrator. + * + * @return the sendToOwners value + */ + public String sendToOwners() { + return this.sendToOwners; + } + + /** + * Set a value indicating whether to send email to subscription administrator. + * + * @param sendToOwners the sendToOwners value to set + * @return the AlertProperties object itself. + */ + public AlertProperties withSendToOwners(String sendToOwners) { + this.sendToOwners = sendToOwners; + return this; + } + + /** + * Get the custom email address for sending emails. + * + * @return the customEmailAddresses value + */ + public List customEmailAddresses() { + return this.customEmailAddresses; + } + + /** + * Set the custom email address for sending emails. + * + * @param customEmailAddresses the customEmailAddresses value to set + * @return the AlertProperties object itself. + */ + public AlertProperties withCustomEmailAddresses(List customEmailAddresses) { + this.customEmailAddresses = customEmailAddresses; + return this; + } + + /** + * Get the locale for the email notification. + * + * @return the locale value + */ + public String locale() { + return this.locale; + } + + /** + * Set the locale for the email notification. + * + * @param locale the locale value to set + * @return the AlertProperties object itself. + */ + public AlertProperties withLocale(String locale) { + this.locale = locale; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AlternateLocationRecoveryOption.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AlternateLocationRecoveryOption.java new file mode 100644 index 0000000000000..316ccd8bd27dc --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AlternateLocationRecoveryOption.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AlternateLocationRecoveryOption. + */ +public enum AlternateLocationRecoveryOption { + /** Enum value CreateVmIfNotFound. */ + CREATE_VM_IF_NOT_FOUND("CreateVmIfNotFound"), + + /** Enum value NoAction. */ + NO_ACTION("NoAction"); + + /** The actual serialized value for a AlternateLocationRecoveryOption instance. */ + private String value; + + AlternateLocationRecoveryOption(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AlternateLocationRecoveryOption instance. + * + * @param value the serialized value to parse. + * @return the parsed AlternateLocationRecoveryOption object, or null if unable to parse. + */ + @JsonCreator + public static AlternateLocationRecoveryOption fromString(String value) { + AlternateLocationRecoveryOption[] items = AlternateLocationRecoveryOption.values(); + for (AlternateLocationRecoveryOption item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ApplyRecoveryPointInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ApplyRecoveryPointInput.java new file mode 100644 index 0000000000000..6739d619219c6 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ApplyRecoveryPointInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input to apply recovery point. + */ +public class ApplyRecoveryPointInput { + /** + * The input properties to apply recovery point. + */ + @JsonProperty(value = "properties") + private ApplyRecoveryPointInputProperties properties; + + /** + * Get the input properties to apply recovery point. + * + * @return the properties value + */ + public ApplyRecoveryPointInputProperties properties() { + return this.properties; + } + + /** + * Set the input properties to apply recovery point. + * + * @param properties the properties value to set + * @return the ApplyRecoveryPointInput object itself. + */ + public ApplyRecoveryPointInput withProperties(ApplyRecoveryPointInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ApplyRecoveryPointInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ApplyRecoveryPointInputProperties.java new file mode 100644 index 0000000000000..b3cc86401bd85 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ApplyRecoveryPointInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input properties to apply recovery point. + */ +public class ApplyRecoveryPointInputProperties { + /** + * The recovery point Id. + */ + @JsonProperty(value = "recoveryPointId") + private String recoveryPointId; + + /** + * Provider specific input for applying recovery point. + */ + @JsonProperty(value = "providerSpecificDetails") + private ApplyRecoveryPointProviderSpecificInput providerSpecificDetails; + + /** + * Get the recovery point Id. + * + * @return the recoveryPointId value + */ + public String recoveryPointId() { + return this.recoveryPointId; + } + + /** + * Set the recovery point Id. + * + * @param recoveryPointId the recoveryPointId value to set + * @return the ApplyRecoveryPointInputProperties object itself. + */ + public ApplyRecoveryPointInputProperties withRecoveryPointId(String recoveryPointId) { + this.recoveryPointId = recoveryPointId; + return this; + } + + /** + * Get provider specific input for applying recovery point. + * + * @return the providerSpecificDetails value + */ + public ApplyRecoveryPointProviderSpecificInput providerSpecificDetails() { + return this.providerSpecificDetails; + } + + /** + * Set provider specific input for applying recovery point. + * + * @param providerSpecificDetails the providerSpecificDetails value to set + * @return the ApplyRecoveryPointInputProperties object itself. + */ + public ApplyRecoveryPointInputProperties withProviderSpecificDetails(ApplyRecoveryPointProviderSpecificInput providerSpecificDetails) { + this.providerSpecificDetails = providerSpecificDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ApplyRecoveryPointProviderSpecificInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ApplyRecoveryPointProviderSpecificInput.java new file mode 100644 index 0000000000000..cad3924deae68 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ApplyRecoveryPointProviderSpecificInput.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Provider specific input for apply recovery point. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("ApplyRecoveryPointProviderSpecificInput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "HyperVReplicaAzure", value = HyperVReplicaAzureApplyRecoveryPointInput.class), + @JsonSubTypes.Type(name = "InMageAzureV2", value = InMageAzureV2ApplyRecoveryPointInput.class), + @JsonSubTypes.Type(name = "A2A", value = A2AApplyRecoveryPointInput.class) +}) +public class ApplyRecoveryPointProviderSpecificInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AsrJobDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AsrJobDetails.java new file mode 100644 index 0000000000000..d2cdaf22af8f4 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AsrJobDetails.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * This class represents job details based on specific job type. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("AsrJobDetails") +public class AsrJobDetails extends JobDetails { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AutomationRunbookTaskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AutomationRunbookTaskDetails.java new file mode 100644 index 0000000000000..b97b2e4c475a5 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AutomationRunbookTaskDetails.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * This class represents the task details for an automation runbook. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("AutomationRunbookTaskDetails") +public class AutomationRunbookTaskDetails extends TaskTypeDetails { + /** + * The recovery plan task name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The cloud service of the automation runbook account. + */ + @JsonProperty(value = "cloudServiceName") + private String cloudServiceName; + + /** + * The subscription Id of the automation runbook account. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /** + * The automation account name of the runbook. + */ + @JsonProperty(value = "accountName") + private String accountName; + + /** + * The runbook Id. + */ + @JsonProperty(value = "runbookId") + private String runbookId; + + /** + * The runbook name. + */ + @JsonProperty(value = "runbookName") + private String runbookName; + + /** + * The job Id of the runbook execution. + */ + @JsonProperty(value = "jobId") + private String jobId; + + /** + * The execution output of the runbook. + */ + @JsonProperty(value = "jobOutput") + private String jobOutput; + + /** + * A value indicating whether it is a primary side script or not. + */ + @JsonProperty(value = "isPrimarySideScript") + private Boolean isPrimarySideScript; + + /** + * Get the recovery plan task name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the recovery plan task name. + * + * @param name the name value to set + * @return the AutomationRunbookTaskDetails object itself. + */ + public AutomationRunbookTaskDetails withName(String name) { + this.name = name; + return this; + } + + /** + * Get the cloud service of the automation runbook account. + * + * @return the cloudServiceName value + */ + public String cloudServiceName() { + return this.cloudServiceName; + } + + /** + * Set the cloud service of the automation runbook account. + * + * @param cloudServiceName the cloudServiceName value to set + * @return the AutomationRunbookTaskDetails object itself. + */ + public AutomationRunbookTaskDetails withCloudServiceName(String cloudServiceName) { + this.cloudServiceName = cloudServiceName; + return this; + } + + /** + * Get the subscription Id of the automation runbook account. + * + * @return the subscriptionId value + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscription Id of the automation runbook account. + * + * @param subscriptionId the subscriptionId value to set + * @return the AutomationRunbookTaskDetails object itself. + */ + public AutomationRunbookTaskDetails withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the automation account name of the runbook. + * + * @return the accountName value + */ + public String accountName() { + return this.accountName; + } + + /** + * Set the automation account name of the runbook. + * + * @param accountName the accountName value to set + * @return the AutomationRunbookTaskDetails object itself. + */ + public AutomationRunbookTaskDetails withAccountName(String accountName) { + this.accountName = accountName; + return this; + } + + /** + * Get the runbook Id. + * + * @return the runbookId value + */ + public String runbookId() { + return this.runbookId; + } + + /** + * Set the runbook Id. + * + * @param runbookId the runbookId value to set + * @return the AutomationRunbookTaskDetails object itself. + */ + public AutomationRunbookTaskDetails withRunbookId(String runbookId) { + this.runbookId = runbookId; + return this; + } + + /** + * Get the runbook name. + * + * @return the runbookName value + */ + public String runbookName() { + return this.runbookName; + } + + /** + * Set the runbook name. + * + * @param runbookName the runbookName value to set + * @return the AutomationRunbookTaskDetails object itself. + */ + public AutomationRunbookTaskDetails withRunbookName(String runbookName) { + this.runbookName = runbookName; + return this; + } + + /** + * Get the job Id of the runbook execution. + * + * @return the jobId value + */ + public String jobId() { + return this.jobId; + } + + /** + * Set the job Id of the runbook execution. + * + * @param jobId the jobId value to set + * @return the AutomationRunbookTaskDetails object itself. + */ + public AutomationRunbookTaskDetails withJobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * Get the execution output of the runbook. + * + * @return the jobOutput value + */ + public String jobOutput() { + return this.jobOutput; + } + + /** + * Set the execution output of the runbook. + * + * @param jobOutput the jobOutput value to set + * @return the AutomationRunbookTaskDetails object itself. + */ + public AutomationRunbookTaskDetails withJobOutput(String jobOutput) { + this.jobOutput = jobOutput; + return this; + } + + /** + * Get a value indicating whether it is a primary side script or not. + * + * @return the isPrimarySideScript value + */ + public Boolean isPrimarySideScript() { + return this.isPrimarySideScript; + } + + /** + * Set a value indicating whether it is a primary side script or not. + * + * @param isPrimarySideScript the isPrimarySideScript value to set + * @return the AutomationRunbookTaskDetails object itself. + */ + public AutomationRunbookTaskDetails withIsPrimarySideScript(Boolean isPrimarySideScript) { + this.isPrimarySideScript = isPrimarySideScript; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureFabricCreationInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureFabricCreationInput.java new file mode 100644 index 0000000000000..315fa804408a5 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureFabricCreationInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Fabric provider specific settings. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("Azure") +public class AzureFabricCreationInput extends FabricSpecificCreationInput { + /** + * The Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get the Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set the Location. + * + * @param location the location value to set + * @return the AzureFabricCreationInput object itself. + */ + public AzureFabricCreationInput withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureFabricSpecificDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureFabricSpecificDetails.java new file mode 100644 index 0000000000000..6e863a741c2a6 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureFabricSpecificDetails.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Azure Fabric Specific Details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("Azure") +public class AzureFabricSpecificDetails extends FabricSpecificDetails { + /** + * The Location for the Azure fabric. + */ + @JsonProperty(value = "location") + private String location; + + /** + * The container Ids for the Azure fabric. + */ + @JsonProperty(value = "containerIds") + private List containerIds; + + /** + * Get the Location for the Azure fabric. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set the Location for the Azure fabric. + * + * @param location the location value to set + * @return the AzureFabricSpecificDetails object itself. + */ + public AzureFabricSpecificDetails withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the container Ids for the Azure fabric. + * + * @return the containerIds value + */ + public List containerIds() { + return this.containerIds; + } + + /** + * Set the container Ids for the Azure fabric. + * + * @param containerIds the containerIds value to set + * @return the AzureFabricSpecificDetails object itself. + */ + public AzureFabricSpecificDetails withContainerIds(List containerIds) { + this.containerIds = containerIds; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureToAzureCreateNetworkMappingInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureToAzureCreateNetworkMappingInput.java new file mode 100644 index 0000000000000..14dcfd55b6433 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureToAzureCreateNetworkMappingInput.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Create network mappings input properties/behaviour specific to Azure to + * Azure Network mapping. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("AzureToAzure") +public class AzureToAzureCreateNetworkMappingInput extends FabricSpecificCreateNetworkMappingInput { + /** + * The primary azure vnet Id. + */ + @JsonProperty(value = "primaryNetworkId") + private String primaryNetworkId; + + /** + * Get the primary azure vnet Id. + * + * @return the primaryNetworkId value + */ + public String primaryNetworkId() { + return this.primaryNetworkId; + } + + /** + * Set the primary azure vnet Id. + * + * @param primaryNetworkId the primaryNetworkId value to set + * @return the AzureToAzureCreateNetworkMappingInput object itself. + */ + public AzureToAzureCreateNetworkMappingInput withPrimaryNetworkId(String primaryNetworkId) { + this.primaryNetworkId = primaryNetworkId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureToAzureNetworkMappingSettings.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureToAzureNetworkMappingSettings.java new file mode 100644 index 0000000000000..0f990a0a95a9e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureToAzureNetworkMappingSettings.java @@ -0,0 +1,73 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * A2A Network Mapping fabric specific settings. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("AzureToAzure") +public class AzureToAzureNetworkMappingSettings extends NetworkMappingFabricSpecificSettings { + /** + * The primary fabric location. + */ + @JsonProperty(value = "primaryFabricLocation") + private String primaryFabricLocation; + + /** + * The recovery fabric location. + */ + @JsonProperty(value = "recoveryFabricLocation") + private String recoveryFabricLocation; + + /** + * Get the primary fabric location. + * + * @return the primaryFabricLocation value + */ + public String primaryFabricLocation() { + return this.primaryFabricLocation; + } + + /** + * Set the primary fabric location. + * + * @param primaryFabricLocation the primaryFabricLocation value to set + * @return the AzureToAzureNetworkMappingSettings object itself. + */ + public AzureToAzureNetworkMappingSettings withPrimaryFabricLocation(String primaryFabricLocation) { + this.primaryFabricLocation = primaryFabricLocation; + return this; + } + + /** + * Get the recovery fabric location. + * + * @return the recoveryFabricLocation value + */ + public String recoveryFabricLocation() { + return this.recoveryFabricLocation; + } + + /** + * Set the recovery fabric location. + * + * @param recoveryFabricLocation the recoveryFabricLocation value to set + * @return the AzureToAzureNetworkMappingSettings object itself. + */ + public AzureToAzureNetworkMappingSettings withRecoveryFabricLocation(String recoveryFabricLocation) { + this.recoveryFabricLocation = recoveryFabricLocation; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureToAzureUpdateNetworkMappingInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureToAzureUpdateNetworkMappingInput.java new file mode 100644 index 0000000000000..9a1e43e357f10 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureToAzureUpdateNetworkMappingInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Updates network mappings input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("AzureToAzure") +public class AzureToAzureUpdateNetworkMappingInput extends FabricSpecificUpdateNetworkMappingInput { + /** + * The primary azure vnet Id. + */ + @JsonProperty(value = "primaryNetworkId") + private String primaryNetworkId; + + /** + * Get the primary azure vnet Id. + * + * @return the primaryNetworkId value + */ + public String primaryNetworkId() { + return this.primaryNetworkId; + } + + /** + * Set the primary azure vnet Id. + * + * @param primaryNetworkId the primaryNetworkId value to set + * @return the AzureToAzureUpdateNetworkMappingInput object itself. + */ + public AzureToAzureUpdateNetworkMappingInput withPrimaryNetworkId(String primaryNetworkId) { + this.primaryNetworkId = primaryNetworkId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureToAzureVmSyncedConfigDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureToAzureVmSyncedConfigDetails.java new file mode 100644 index 0000000000000..bfedd8eb6f6c2 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureToAzureVmSyncedConfigDetails.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure to Azure VM synced configuration details. + */ +public class AzureToAzureVmSyncedConfigDetails { + /** + * The Azure VM tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The Azure role assignments. + */ + @JsonProperty(value = "roleAssignments") + private List roleAssignments; + + /** + * The Azure VM input endpoints. + */ + @JsonProperty(value = "inputEndpoints") + private List inputEndpoints; + + /** + * Get the Azure VM tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the Azure VM tags. + * + * @param tags the tags value to set + * @return the AzureToAzureVmSyncedConfigDetails object itself. + */ + public AzureToAzureVmSyncedConfigDetails withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the Azure role assignments. + * + * @return the roleAssignments value + */ + public List roleAssignments() { + return this.roleAssignments; + } + + /** + * Set the Azure role assignments. + * + * @param roleAssignments the roleAssignments value to set + * @return the AzureToAzureVmSyncedConfigDetails object itself. + */ + public AzureToAzureVmSyncedConfigDetails withRoleAssignments(List roleAssignments) { + this.roleAssignments = roleAssignments; + return this; + } + + /** + * Get the Azure VM input endpoints. + * + * @return the inputEndpoints value + */ + public List inputEndpoints() { + return this.inputEndpoints; + } + + /** + * Set the Azure VM input endpoints. + * + * @param inputEndpoints the inputEndpoints value to set + * @return the AzureToAzureVmSyncedConfigDetails object itself. + */ + public AzureToAzureVmSyncedConfigDetails withInputEndpoints(List inputEndpoints) { + this.inputEndpoints = inputEndpoints; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureVmDiskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureVmDiskDetails.java new file mode 100644 index 0000000000000..97850136329af --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/AzureVmDiskDetails.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Disk details for E2A provider. + */ +public class AzureVmDiskDetails { + /** + * VHD type. + */ + @JsonProperty(value = "vhdType") + private String vhdType; + + /** + * The VHD id. + */ + @JsonProperty(value = "vhdId") + private String vhdId; + + /** + * VHD name. + */ + @JsonProperty(value = "vhdName") + private String vhdName; + + /** + * Max side in MB. + */ + @JsonProperty(value = "maxSizeMB") + private String maxSizeMB; + + /** + * Blob uri of the Azure disk. + */ + @JsonProperty(value = "targetDiskLocation") + private String targetDiskLocation; + + /** + * The target Azure disk name. + */ + @JsonProperty(value = "targetDiskName") + private String targetDiskName; + + /** + * Ordinal\LunId of the disk for the Azure VM. + */ + @JsonProperty(value = "lunId") + private String lunId; + + /** + * Get vHD type. + * + * @return the vhdType value + */ + public String vhdType() { + return this.vhdType; + } + + /** + * Set vHD type. + * + * @param vhdType the vhdType value to set + * @return the AzureVmDiskDetails object itself. + */ + public AzureVmDiskDetails withVhdType(String vhdType) { + this.vhdType = vhdType; + return this; + } + + /** + * Get the VHD id. + * + * @return the vhdId value + */ + public String vhdId() { + return this.vhdId; + } + + /** + * Set the VHD id. + * + * @param vhdId the vhdId value to set + * @return the AzureVmDiskDetails object itself. + */ + public AzureVmDiskDetails withVhdId(String vhdId) { + this.vhdId = vhdId; + return this; + } + + /** + * Get vHD name. + * + * @return the vhdName value + */ + public String vhdName() { + return this.vhdName; + } + + /** + * Set vHD name. + * + * @param vhdName the vhdName value to set + * @return the AzureVmDiskDetails object itself. + */ + public AzureVmDiskDetails withVhdName(String vhdName) { + this.vhdName = vhdName; + return this; + } + + /** + * Get max side in MB. + * + * @return the maxSizeMB value + */ + public String maxSizeMB() { + return this.maxSizeMB; + } + + /** + * Set max side in MB. + * + * @param maxSizeMB the maxSizeMB value to set + * @return the AzureVmDiskDetails object itself. + */ + public AzureVmDiskDetails withMaxSizeMB(String maxSizeMB) { + this.maxSizeMB = maxSizeMB; + return this; + } + + /** + * Get blob uri of the Azure disk. + * + * @return the targetDiskLocation value + */ + public String targetDiskLocation() { + return this.targetDiskLocation; + } + + /** + * Set blob uri of the Azure disk. + * + * @param targetDiskLocation the targetDiskLocation value to set + * @return the AzureVmDiskDetails object itself. + */ + public AzureVmDiskDetails withTargetDiskLocation(String targetDiskLocation) { + this.targetDiskLocation = targetDiskLocation; + return this; + } + + /** + * Get the target Azure disk name. + * + * @return the targetDiskName value + */ + public String targetDiskName() { + return this.targetDiskName; + } + + /** + * Set the target Azure disk name. + * + * @param targetDiskName the targetDiskName value to set + * @return the AzureVmDiskDetails object itself. + */ + public AzureVmDiskDetails withTargetDiskName(String targetDiskName) { + this.targetDiskName = targetDiskName; + return this; + } + + /** + * Get ordinal\LunId of the disk for the Azure VM. + * + * @return the lunId value + */ + public String lunId() { + return this.lunId; + } + + /** + * Set ordinal\LunId of the disk for the Azure VM. + * + * @param lunId the lunId value to set + * @return the AzureVmDiskDetails object itself. + */ + public AzureVmDiskDetails withLunId(String lunId) { + this.lunId = lunId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ConfigurationSettings.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ConfigurationSettings.java new file mode 100644 index 0000000000000..866f3bc956213 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ConfigurationSettings.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Replication provider specific settings. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("ConfigurationSettings") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "HyperVVirtualMachine", value = HyperVVirtualMachineDetails.class), + @JsonSubTypes.Type(name = "VMwareVirtualMachine", value = VMwareVirtualMachineDetails.class), + @JsonSubTypes.Type(name = "ReplicationGroupDetails", value = ReplicationGroupDetails.class) +}) +public class ConfigurationSettings { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ConfigureAlertRequest.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ConfigureAlertRequest.java new file mode 100644 index 0000000000000..53bed68a4dd1e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ConfigureAlertRequest.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Request to configure alerts for the system. + */ +public class ConfigureAlertRequest { + /** + * The properties of a configure alert request. + */ + @JsonProperty(value = "properties") + private ConfigureAlertRequestProperties properties; + + /** + * Get the properties of a configure alert request. + * + * @return the properties value + */ + public ConfigureAlertRequestProperties properties() { + return this.properties; + } + + /** + * Set the properties of a configure alert request. + * + * @param properties the properties value to set + * @return the ConfigureAlertRequest object itself. + */ + public ConfigureAlertRequest withProperties(ConfigureAlertRequestProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ConfigureAlertRequestProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ConfigureAlertRequestProperties.java new file mode 100644 index 0000000000000..17e0f2e53b01c --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ConfigureAlertRequestProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of a configure alert request. + */ +public class ConfigureAlertRequestProperties { + /** + * A value indicating whether to send email to subscription administrator. + */ + @JsonProperty(value = "sendToOwners") + private String sendToOwners; + + /** + * The custom email address for sending emails. + */ + @JsonProperty(value = "customEmailAddresses") + private List customEmailAddresses; + + /** + * The locale for the email notification. + */ + @JsonProperty(value = "locale") + private String locale; + + /** + * Get a value indicating whether to send email to subscription administrator. + * + * @return the sendToOwners value + */ + public String sendToOwners() { + return this.sendToOwners; + } + + /** + * Set a value indicating whether to send email to subscription administrator. + * + * @param sendToOwners the sendToOwners value to set + * @return the ConfigureAlertRequestProperties object itself. + */ + public ConfigureAlertRequestProperties withSendToOwners(String sendToOwners) { + this.sendToOwners = sendToOwners; + return this; + } + + /** + * Get the custom email address for sending emails. + * + * @return the customEmailAddresses value + */ + public List customEmailAddresses() { + return this.customEmailAddresses; + } + + /** + * Set the custom email address for sending emails. + * + * @param customEmailAddresses the customEmailAddresses value to set + * @return the ConfigureAlertRequestProperties object itself. + */ + public ConfigureAlertRequestProperties withCustomEmailAddresses(List customEmailAddresses) { + this.customEmailAddresses = customEmailAddresses; + return this; + } + + /** + * Get the locale for the email notification. + * + * @return the locale value + */ + public String locale() { + return this.locale; + } + + /** + * Set the locale for the email notification. + * + * @param locale the locale value to set + * @return the ConfigureAlertRequestProperties object itself. + */ + public ConfigureAlertRequestProperties withLocale(String locale) { + this.locale = locale; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ConsistencyCheckTaskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ConsistencyCheckTaskDetails.java new file mode 100644 index 0000000000000..26f51301082ea --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ConsistencyCheckTaskDetails.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * This class contains monitoring details of all the inconsistent Protected + * Entites in Vmm. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("ConsistencyCheckTaskDetails") +public class ConsistencyCheckTaskDetails extends TaskTypeDetails { + /** + * The list of inconsistent Vm details. + */ + @JsonProperty(value = "vmDetails") + private List vmDetails; + + /** + * Get the list of inconsistent Vm details. + * + * @return the vmDetails value + */ + public List vmDetails() { + return this.vmDetails; + } + + /** + * Set the list of inconsistent Vm details. + * + * @param vmDetails the vmDetails value to set + * @return the ConsistencyCheckTaskDetails object itself. + */ + public ConsistencyCheckTaskDetails withVmDetails(List vmDetails) { + this.vmDetails = vmDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateNetworkMappingInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateNetworkMappingInput.java new file mode 100644 index 0000000000000..503e8fa8ab205 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateNetworkMappingInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Create network mappings input. + */ +public class CreateNetworkMappingInput { + /** + * Input properties for creating network mapping. + */ + @JsonProperty(value = "properties") + private CreateNetworkMappingInputProperties properties; + + /** + * Get input properties for creating network mapping. + * + * @return the properties value + */ + public CreateNetworkMappingInputProperties properties() { + return this.properties; + } + + /** + * Set input properties for creating network mapping. + * + * @param properties the properties value to set + * @return the CreateNetworkMappingInput object itself. + */ + public CreateNetworkMappingInput withProperties(CreateNetworkMappingInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateNetworkMappingInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateNetworkMappingInputProperties.java new file mode 100644 index 0000000000000..17264871f68ff --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateNetworkMappingInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Common input details for network mapping operation. + */ +public class CreateNetworkMappingInputProperties { + /** + * Recovery fabric Name. + */ + @JsonProperty(value = "recoveryFabricName") + private String recoveryFabricName; + + /** + * Recovery network Id. + */ + @JsonProperty(value = "recoveryNetworkId") + private String recoveryNetworkId; + + /** + * Fabric specific input properties. + */ + @JsonProperty(value = "fabricSpecificDetails") + private FabricSpecificCreateNetworkMappingInput fabricSpecificDetails; + + /** + * Get recovery fabric Name. + * + * @return the recoveryFabricName value + */ + public String recoveryFabricName() { + return this.recoveryFabricName; + } + + /** + * Set recovery fabric Name. + * + * @param recoveryFabricName the recoveryFabricName value to set + * @return the CreateNetworkMappingInputProperties object itself. + */ + public CreateNetworkMappingInputProperties withRecoveryFabricName(String recoveryFabricName) { + this.recoveryFabricName = recoveryFabricName; + return this; + } + + /** + * Get recovery network Id. + * + * @return the recoveryNetworkId value + */ + public String recoveryNetworkId() { + return this.recoveryNetworkId; + } + + /** + * Set recovery network Id. + * + * @param recoveryNetworkId the recoveryNetworkId value to set + * @return the CreateNetworkMappingInputProperties object itself. + */ + public CreateNetworkMappingInputProperties withRecoveryNetworkId(String recoveryNetworkId) { + this.recoveryNetworkId = recoveryNetworkId; + return this; + } + + /** + * Get fabric specific input properties. + * + * @return the fabricSpecificDetails value + */ + public FabricSpecificCreateNetworkMappingInput fabricSpecificDetails() { + return this.fabricSpecificDetails; + } + + /** + * Set fabric specific input properties. + * + * @param fabricSpecificDetails the fabricSpecificDetails value to set + * @return the CreateNetworkMappingInputProperties object itself. + */ + public CreateNetworkMappingInputProperties withFabricSpecificDetails(FabricSpecificCreateNetworkMappingInput fabricSpecificDetails) { + this.fabricSpecificDetails = fabricSpecificDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreatePolicyInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreatePolicyInput.java new file mode 100644 index 0000000000000..2726da1ee7749 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreatePolicyInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Protection profile input. + */ +public class CreatePolicyInput { + /** + * Policy creation properties. + */ + @JsonProperty(value = "properties") + private CreatePolicyInputProperties properties; + + /** + * Get policy creation properties. + * + * @return the properties value + */ + public CreatePolicyInputProperties properties() { + return this.properties; + } + + /** + * Set policy creation properties. + * + * @param properties the properties value to set + * @return the CreatePolicyInput object itself. + */ + public CreatePolicyInput withProperties(CreatePolicyInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreatePolicyInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreatePolicyInputProperties.java new file mode 100644 index 0000000000000..cc23aedf18cba --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreatePolicyInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Policy creation properties. + */ +public class CreatePolicyInputProperties { + /** + * The ReplicationProviderSettings. + */ + @JsonProperty(value = "providerSpecificInput") + private PolicyProviderSpecificInput providerSpecificInput; + + /** + * Get the ReplicationProviderSettings. + * + * @return the providerSpecificInput value + */ + public PolicyProviderSpecificInput providerSpecificInput() { + return this.providerSpecificInput; + } + + /** + * Set the ReplicationProviderSettings. + * + * @param providerSpecificInput the providerSpecificInput value to set + * @return the CreatePolicyInputProperties object itself. + */ + public CreatePolicyInputProperties withProviderSpecificInput(PolicyProviderSpecificInput providerSpecificInput) { + this.providerSpecificInput = providerSpecificInput; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateProtectionContainerInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateProtectionContainerInput.java new file mode 100644 index 0000000000000..4d877ead9b23f --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateProtectionContainerInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Create protection container input. + */ +public class CreateProtectionContainerInput { + /** + * Create protection container input properties. + */ + @JsonProperty(value = "properties") + private CreateProtectionContainerInputProperties properties; + + /** + * Get create protection container input properties. + * + * @return the properties value + */ + public CreateProtectionContainerInputProperties properties() { + return this.properties; + } + + /** + * Set create protection container input properties. + * + * @param properties the properties value to set + * @return the CreateProtectionContainerInput object itself. + */ + public CreateProtectionContainerInput withProperties(CreateProtectionContainerInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateProtectionContainerInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateProtectionContainerInputProperties.java new file mode 100644 index 0000000000000..45cd00278f129 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateProtectionContainerInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Create protection container input properties. + */ +public class CreateProtectionContainerInputProperties { + /** + * Provider specific inputs for container creation. + */ + @JsonProperty(value = "providerSpecificInput") + private List providerSpecificInput; + + /** + * Get provider specific inputs for container creation. + * + * @return the providerSpecificInput value + */ + public List providerSpecificInput() { + return this.providerSpecificInput; + } + + /** + * Set provider specific inputs for container creation. + * + * @param providerSpecificInput the providerSpecificInput value to set + * @return the CreateProtectionContainerInputProperties object itself. + */ + public CreateProtectionContainerInputProperties withProviderSpecificInput(List providerSpecificInput) { + this.providerSpecificInput = providerSpecificInput; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateProtectionContainerMappingInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateProtectionContainerMappingInput.java new file mode 100644 index 0000000000000..a2bfdd0d5bf90 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateProtectionContainerMappingInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configure pairing input. + */ +public class CreateProtectionContainerMappingInput { + /** + * Configure protection input properties. + */ + @JsonProperty(value = "properties") + private CreateProtectionContainerMappingInputProperties properties; + + /** + * Get configure protection input properties. + * + * @return the properties value + */ + public CreateProtectionContainerMappingInputProperties properties() { + return this.properties; + } + + /** + * Set configure protection input properties. + * + * @param properties the properties value to set + * @return the CreateProtectionContainerMappingInput object itself. + */ + public CreateProtectionContainerMappingInput withProperties(CreateProtectionContainerMappingInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateProtectionContainerMappingInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateProtectionContainerMappingInputProperties.java new file mode 100644 index 0000000000000..145feeea9dd9b --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateProtectionContainerMappingInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configure pairing input properties. + */ +public class CreateProtectionContainerMappingInputProperties { + /** + * The target unique protection container name. + */ + @JsonProperty(value = "targetProtectionContainerId") + private String targetProtectionContainerId; + + /** + * Applicable policy. + */ + @JsonProperty(value = "PolicyId") + private String policyId; + + /** + * Provider specific input for pairing. + */ + @JsonProperty(value = "providerSpecificInput") + private ReplicationProviderSpecificContainerMappingInput providerSpecificInput; + + /** + * Get the target unique protection container name. + * + * @return the targetProtectionContainerId value + */ + public String targetProtectionContainerId() { + return this.targetProtectionContainerId; + } + + /** + * Set the target unique protection container name. + * + * @param targetProtectionContainerId the targetProtectionContainerId value to set + * @return the CreateProtectionContainerMappingInputProperties object itself. + */ + public CreateProtectionContainerMappingInputProperties withTargetProtectionContainerId(String targetProtectionContainerId) { + this.targetProtectionContainerId = targetProtectionContainerId; + return this; + } + + /** + * Get applicable policy. + * + * @return the policyId value + */ + public String policyId() { + return this.policyId; + } + + /** + * Set applicable policy. + * + * @param policyId the policyId value to set + * @return the CreateProtectionContainerMappingInputProperties object itself. + */ + public CreateProtectionContainerMappingInputProperties withPolicyId(String policyId) { + this.policyId = policyId; + return this; + } + + /** + * Get provider specific input for pairing. + * + * @return the providerSpecificInput value + */ + public ReplicationProviderSpecificContainerMappingInput providerSpecificInput() { + return this.providerSpecificInput; + } + + /** + * Set provider specific input for pairing. + * + * @param providerSpecificInput the providerSpecificInput value to set + * @return the CreateProtectionContainerMappingInputProperties object itself. + */ + public CreateProtectionContainerMappingInputProperties withProviderSpecificInput(ReplicationProviderSpecificContainerMappingInput providerSpecificInput) { + this.providerSpecificInput = providerSpecificInput; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateRecoveryPlanInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateRecoveryPlanInput.java new file mode 100644 index 0000000000000..7219e4db43963 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateRecoveryPlanInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Create recovery plan input class. + */ +public class CreateRecoveryPlanInput { + /** + * Recovery plan creation properties. + */ + @JsonProperty(value = "properties", required = true) + private CreateRecoveryPlanInputProperties properties; + + /** + * Get recovery plan creation properties. + * + * @return the properties value + */ + public CreateRecoveryPlanInputProperties properties() { + return this.properties; + } + + /** + * Set recovery plan creation properties. + * + * @param properties the properties value to set + * @return the CreateRecoveryPlanInput object itself. + */ + public CreateRecoveryPlanInput withProperties(CreateRecoveryPlanInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateRecoveryPlanInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateRecoveryPlanInputProperties.java new file mode 100644 index 0000000000000..e3a73277b06c0 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CreateRecoveryPlanInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Recovery plan creation properties. + */ +public class CreateRecoveryPlanInputProperties { + /** + * The primary fabric Id. + */ + @JsonProperty(value = "primaryFabricId", required = true) + private String primaryFabricId; + + /** + * The recovery fabric Id. + */ + @JsonProperty(value = "recoveryFabricId", required = true) + private String recoveryFabricId; + + /** + * The failover deployment model. Possible values include: 'NotApplicable', + * 'Classic', 'ResourceManager'. + */ + @JsonProperty(value = "failoverDeploymentModel") + private FailoverDeploymentModel failoverDeploymentModel; + + /** + * The recovery plan groups. + */ + @JsonProperty(value = "groups", required = true) + private List groups; + + /** + * Get the primary fabric Id. + * + * @return the primaryFabricId value + */ + public String primaryFabricId() { + return this.primaryFabricId; + } + + /** + * Set the primary fabric Id. + * + * @param primaryFabricId the primaryFabricId value to set + * @return the CreateRecoveryPlanInputProperties object itself. + */ + public CreateRecoveryPlanInputProperties withPrimaryFabricId(String primaryFabricId) { + this.primaryFabricId = primaryFabricId; + return this; + } + + /** + * Get the recovery fabric Id. + * + * @return the recoveryFabricId value + */ + public String recoveryFabricId() { + return this.recoveryFabricId; + } + + /** + * Set the recovery fabric Id. + * + * @param recoveryFabricId the recoveryFabricId value to set + * @return the CreateRecoveryPlanInputProperties object itself. + */ + public CreateRecoveryPlanInputProperties withRecoveryFabricId(String recoveryFabricId) { + this.recoveryFabricId = recoveryFabricId; + return this; + } + + /** + * Get the failover deployment model. Possible values include: 'NotApplicable', 'Classic', 'ResourceManager'. + * + * @return the failoverDeploymentModel value + */ + public FailoverDeploymentModel failoverDeploymentModel() { + return this.failoverDeploymentModel; + } + + /** + * Set the failover deployment model. Possible values include: 'NotApplicable', 'Classic', 'ResourceManager'. + * + * @param failoverDeploymentModel the failoverDeploymentModel value to set + * @return the CreateRecoveryPlanInputProperties object itself. + */ + public CreateRecoveryPlanInputProperties withFailoverDeploymentModel(FailoverDeploymentModel failoverDeploymentModel) { + this.failoverDeploymentModel = failoverDeploymentModel; + return this; + } + + /** + * Get the recovery plan groups. + * + * @return the groups value + */ + public List groups() { + return this.groups; + } + + /** + * Set the recovery plan groups. + * + * @param groups the groups value to set + * @return the CreateRecoveryPlanInputProperties object itself. + */ + public CreateRecoveryPlanInputProperties withGroups(List groups) { + this.groups = groups; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CurrentScenarioDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CurrentScenarioDetails.java new file mode 100644 index 0000000000000..70c75c177bf12 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/CurrentScenarioDetails.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.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Current scenario details of the protected entity. + */ +public class CurrentScenarioDetails { + /** + * Scenario name. + */ + @JsonProperty(value = "scenarioName") + private String scenarioName; + + /** + * ARM Id of the job being executed. + */ + @JsonProperty(value = "jobId") + private String jobId; + + /** + * Start time of the workflow. + */ + @JsonProperty(value = "startTime") + private DateTime startTime; + + /** + * Get scenario name. + * + * @return the scenarioName value + */ + public String scenarioName() { + return this.scenarioName; + } + + /** + * Set scenario name. + * + * @param scenarioName the scenarioName value to set + * @return the CurrentScenarioDetails object itself. + */ + public CurrentScenarioDetails withScenarioName(String scenarioName) { + this.scenarioName = scenarioName; + return this; + } + + /** + * Get aRM Id of the job being executed. + * + * @return the jobId value + */ + public String jobId() { + return this.jobId; + } + + /** + * Set aRM Id of the job being executed. + * + * @param jobId the jobId value to set + * @return the CurrentScenarioDetails object itself. + */ + public CurrentScenarioDetails withJobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * Get start time of the workflow. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set start time of the workflow. + * + * @param startTime the startTime value to set + * @return the CurrentScenarioDetails object itself. + */ + public CurrentScenarioDetails withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DataStore.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DataStore.java new file mode 100644 index 0000000000000..5bcdbcb5ae2b5 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DataStore.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The datastore details of the MT. + */ +public class DataStore { + /** + * The symbolic name of data store. + */ + @JsonProperty(value = "symbolicName") + private String symbolicName; + + /** + * The uuid of data store. + */ + @JsonProperty(value = "uuid") + private String uuid; + + /** + * The capacity of data store in GBs. + */ + @JsonProperty(value = "capacity") + private String capacity; + + /** + * The free space of data store in GBs. + */ + @JsonProperty(value = "freeSpace") + private String freeSpace; + + /** + * The type of data store. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get the symbolic name of data store. + * + * @return the symbolicName value + */ + public String symbolicName() { + return this.symbolicName; + } + + /** + * Set the symbolic name of data store. + * + * @param symbolicName the symbolicName value to set + * @return the DataStore object itself. + */ + public DataStore withSymbolicName(String symbolicName) { + this.symbolicName = symbolicName; + return this; + } + + /** + * Get the uuid of data store. + * + * @return the uuid value + */ + public String uuid() { + return this.uuid; + } + + /** + * Set the uuid of data store. + * + * @param uuid the uuid value to set + * @return the DataStore object itself. + */ + public DataStore withUuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get the capacity of data store in GBs. + * + * @return the capacity value + */ + public String capacity() { + return this.capacity; + } + + /** + * Set the capacity of data store in GBs. + * + * @param capacity the capacity value to set + * @return the DataStore object itself. + */ + public DataStore withCapacity(String capacity) { + this.capacity = capacity; + return this; + } + + /** + * Get the free space of data store in GBs. + * + * @return the freeSpace value + */ + public String freeSpace() { + return this.freeSpace; + } + + /** + * Set the free space of data store in GBs. + * + * @param freeSpace the freeSpace value to set + * @return the DataStore object itself. + */ + public DataStore withFreeSpace(String freeSpace) { + this.freeSpace = freeSpace; + return this; + } + + /** + * Get the type of data store. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type of data store. + * + * @param type the type value to set + * @return the DataStore object itself. + */ + public DataStore withType(String type) { + this.type = type; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DataSyncStatus.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DataSyncStatus.java new file mode 100644 index 0000000000000..eb2972cacc595 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DataSyncStatus.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DataSyncStatus. + */ +public enum DataSyncStatus { + /** Enum value ForDownTime. */ + FOR_DOWN_TIME("ForDownTime"), + + /** Enum value ForSynchronization. */ + FOR_SYNCHRONIZATION("ForSynchronization"); + + /** The actual serialized value for a DataSyncStatus instance. */ + private String value; + + DataSyncStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DataSyncStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed DataSyncStatus object, or null if unable to parse. + */ + @JsonCreator + public static DataSyncStatus fromString(String value) { + DataSyncStatus[] items = DataSyncStatus.values(); + for (DataSyncStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DisableProtectionInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DisableProtectionInput.java new file mode 100644 index 0000000000000..67d9fc19b4fda --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DisableProtectionInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Disable protection input. + */ +public class DisableProtectionInput { + /** + * Disable protection input properties. + */ + @JsonProperty(value = "properties") + private DisableProtectionInputProperties properties; + + /** + * Get disable protection input properties. + * + * @return the properties value + */ + public DisableProtectionInputProperties properties() { + return this.properties; + } + + /** + * Set disable protection input properties. + * + * @param properties the properties value to set + * @return the DisableProtectionInput object itself. + */ + public DisableProtectionInput withProperties(DisableProtectionInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DisableProtectionInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DisableProtectionInputProperties.java new file mode 100644 index 0000000000000..804f2bc3f819a --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DisableProtectionInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Disable protection input properties. + */ +public class DisableProtectionInputProperties { + /** + * Disable protection reason. It can have values + * NotSpecified/MigrationComplete. Possible values include: 'NotSpecified', + * 'MigrationComplete'. + */ + @JsonProperty(value = "disableProtectionReason") + private DisableProtectionReason disableProtectionReason; + + /** + * Replication provider specific input. + */ + @JsonProperty(value = "replicationProviderInput") + private DisableProtectionProviderSpecificInput replicationProviderInput; + + /** + * Get disable protection reason. It can have values NotSpecified/MigrationComplete. Possible values include: 'NotSpecified', 'MigrationComplete'. + * + * @return the disableProtectionReason value + */ + public DisableProtectionReason disableProtectionReason() { + return this.disableProtectionReason; + } + + /** + * Set disable protection reason. It can have values NotSpecified/MigrationComplete. Possible values include: 'NotSpecified', 'MigrationComplete'. + * + * @param disableProtectionReason the disableProtectionReason value to set + * @return the DisableProtectionInputProperties object itself. + */ + public DisableProtectionInputProperties withDisableProtectionReason(DisableProtectionReason disableProtectionReason) { + this.disableProtectionReason = disableProtectionReason; + return this; + } + + /** + * Get replication provider specific input. + * + * @return the replicationProviderInput value + */ + public DisableProtectionProviderSpecificInput replicationProviderInput() { + return this.replicationProviderInput; + } + + /** + * Set replication provider specific input. + * + * @param replicationProviderInput the replicationProviderInput value to set + * @return the DisableProtectionInputProperties object itself. + */ + public DisableProtectionInputProperties withReplicationProviderInput(DisableProtectionProviderSpecificInput replicationProviderInput) { + this.replicationProviderInput = replicationProviderInput; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DisableProtectionProviderSpecificInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DisableProtectionProviderSpecificInput.java new file mode 100644 index 0000000000000..24e4cf99db4df --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DisableProtectionProviderSpecificInput.java @@ -0,0 +1,24 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Disable protection provider specific input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("DisableProtectionProviderSpecificInput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "InMage", value = InMageDisableProtectionProviderSpecificInput.class) +}) +public class DisableProtectionProviderSpecificInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DisableProtectionReason.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DisableProtectionReason.java new file mode 100644 index 0000000000000..fc5e712d742a2 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DisableProtectionReason.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DisableProtectionReason. + */ +public enum DisableProtectionReason { + /** Enum value NotSpecified. */ + NOT_SPECIFIED("NotSpecified"), + + /** Enum value MigrationComplete. */ + MIGRATION_COMPLETE("MigrationComplete"); + + /** The actual serialized value for a DisableProtectionReason instance. */ + private String value; + + DisableProtectionReason(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DisableProtectionReason instance. + * + * @param value the serialized value to parse. + * @return the parsed DisableProtectionReason object, or null if unable to parse. + */ + @JsonCreator + public static DisableProtectionReason fromString(String value) { + DisableProtectionReason[] items = DisableProtectionReason.values(); + for (DisableProtectionReason item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DiscoverProtectableItemRequest.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DiscoverProtectableItemRequest.java new file mode 100644 index 0000000000000..7aa04629f834d --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DiscoverProtectableItemRequest.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Request to add a physical machine as a protectable item in a container. + */ +public class DiscoverProtectableItemRequest { + /** + * The properties of a discover protectable item request. + */ + @JsonProperty(value = "properties") + private DiscoverProtectableItemRequestProperties properties; + + /** + * Get the properties of a discover protectable item request. + * + * @return the properties value + */ + public DiscoverProtectableItemRequestProperties properties() { + return this.properties; + } + + /** + * Set the properties of a discover protectable item request. + * + * @param properties the properties value to set + * @return the DiscoverProtectableItemRequest object itself. + */ + public DiscoverProtectableItemRequest withProperties(DiscoverProtectableItemRequestProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DiscoverProtectableItemRequestProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DiscoverProtectableItemRequestProperties.java new file mode 100644 index 0000000000000..1dad34a13c975 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DiscoverProtectableItemRequestProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Discover protectable item properties. + */ +public class DiscoverProtectableItemRequestProperties { + /** + * The friendly name of the physical machine. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * The IP address of the physical machine to be discovered. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * The OS type on the physical machine. + */ + @JsonProperty(value = "osType") + private String osType; + + /** + * Get the friendly name of the physical machine. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the friendly name of the physical machine. + * + * @param friendlyName the friendlyName value to set + * @return the DiscoverProtectableItemRequestProperties object itself. + */ + public DiscoverProtectableItemRequestProperties withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the IP address of the physical machine to be discovered. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the IP address of the physical machine to be discovered. + * + * @param ipAddress the ipAddress value to set + * @return the DiscoverProtectableItemRequestProperties object itself. + */ + public DiscoverProtectableItemRequestProperties withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the OS type on the physical machine. + * + * @return the osType value + */ + public String osType() { + return this.osType; + } + + /** + * Set the OS type on the physical machine. + * + * @param osType the osType value to set + * @return the DiscoverProtectableItemRequestProperties object itself. + */ + public DiscoverProtectableItemRequestProperties withOsType(String osType) { + this.osType = osType; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DiskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DiskDetails.java new file mode 100644 index 0000000000000..f6f2a7964ad18 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DiskDetails.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Onprem disk details data. + */ +public class DiskDetails { + /** + * The hard disk max size in MB. + */ + @JsonProperty(value = "maxSizeMB") + private Long maxSizeMB; + + /** + * The type of the volume. + */ + @JsonProperty(value = "vhdType") + private String vhdType; + + /** + * The VHD Id. + */ + @JsonProperty(value = "vhdId") + private String vhdId; + + /** + * The VHD name. + */ + @JsonProperty(value = "vhdName") + private String vhdName; + + /** + * Get the hard disk max size in MB. + * + * @return the maxSizeMB value + */ + public Long maxSizeMB() { + return this.maxSizeMB; + } + + /** + * Set the hard disk max size in MB. + * + * @param maxSizeMB the maxSizeMB value to set + * @return the DiskDetails object itself. + */ + public DiskDetails withMaxSizeMB(Long maxSizeMB) { + this.maxSizeMB = maxSizeMB; + return this; + } + + /** + * Get the type of the volume. + * + * @return the vhdType value + */ + public String vhdType() { + return this.vhdType; + } + + /** + * Set the type of the volume. + * + * @param vhdType the vhdType value to set + * @return the DiskDetails object itself. + */ + public DiskDetails withVhdType(String vhdType) { + this.vhdType = vhdType; + return this; + } + + /** + * Get the VHD Id. + * + * @return the vhdId value + */ + public String vhdId() { + return this.vhdId; + } + + /** + * Set the VHD Id. + * + * @param vhdId the vhdId value to set + * @return the DiskDetails object itself. + */ + public DiskDetails withVhdId(String vhdId) { + this.vhdId = vhdId; + return this; + } + + /** + * Get the VHD name. + * + * @return the vhdName value + */ + public String vhdName() { + return this.vhdName; + } + + /** + * Set the VHD name. + * + * @param vhdName the vhdName value to set + * @return the DiskDetails object itself. + */ + public DiskDetails withVhdName(String vhdName) { + this.vhdName = vhdName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DiskVolumeDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DiskVolumeDetails.java new file mode 100644 index 0000000000000..a15a7585cb580 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/DiskVolumeDetails.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Volume details. + */ +public class DiskVolumeDetails { + /** + * The volume label. + */ + @JsonProperty(value = "label") + private String label; + + /** + * The volume name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Get the volume label. + * + * @return the label value + */ + public String label() { + return this.label; + } + + /** + * Set the volume label. + * + * @param label the label value to set + * @return the DiskVolumeDetails object itself. + */ + public DiskVolumeDetails withLabel(String label) { + this.label = label; + return this; + } + + /** + * Get the volume name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the volume name. + * + * @param name the name value to set + * @return the DiskVolumeDetails object itself. + */ + public DiskVolumeDetails withName(String name) { + this.name = name; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Display.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Display.java new file mode 100644 index 0000000000000..c26ab8536f56b --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Display.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains the localized display information for this particular operation / + * action. These value will be used by several clients for (1) custom role + * definitions for RBAC; (2) complex query filters for the event service; and + * (3) audit history / records for management operations. + */ +public class Display { + /** + * The provider. The localized friendly form of the resource provider name + * – it is expected to also include the publisher/company responsible. It + * should use Title Casing and begin with "Microsoft" for 1st party + * services. e.g. "Microsoft Monitoring Insights" or "Microsoft Compute.". + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * The resource. The localized friendly form of the resource related to + * this action/operation – it should match the public documentation for the + * resource provider. It should use Title Casing. This value should be + * unique for a particular URL type (e.g. nested types should *not* reuse + * their parent’s display.resource field). e.g. "Virtual Machines" or + * "Scheduler Job Collections", or "Virtual Machine VM Sizes" or "Scheduler + * Jobs". + */ + @JsonProperty(value = "resource") + private String resource; + + /** + * The operation. The localized friendly name for the operation, as it + * should be shown to the user. It should be concise (to fit in drop downs) + * but clear (i.e. self-documenting). It should use Title Casing. + * Prescriptive guidance: Read Create or Update Delete 'ActionName'. + */ + @JsonProperty(value = "operation") + private String operation; + + /** + * The description. The localized friendly description for the operation, + * as it should be shown to the user. It should be thorough, yet concise – + * it will be used in tool tips and detailed views. Prescriptive guidance + * for namespaces: Read any 'display.provider' resource Create or Update + * any 'display.provider' resource Delete any 'display.provider' resource + * Perform any other action on any 'display.provider' resource Prescriptive + * guidance for namespaces: Read any 'display.resource' Create or Update + * any 'display.resource' Delete any 'display.resource' 'ActionName' any + * 'display.resources'. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the provider. The localized friendly form of the resource provider name – it is expected to also include the publisher/company responsible. It should use Title Casing and begin with "Microsoft" for 1st party services. e.g. "Microsoft Monitoring Insights" or "Microsoft Compute.". + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set the provider. The localized friendly form of the resource provider name – it is expected to also include the publisher/company responsible. It should use Title Casing and begin with "Microsoft" for 1st party services. e.g. "Microsoft Monitoring Insights" or "Microsoft Compute.". + * + * @param provider the provider value to set + * @return the Display object itself. + */ + public Display withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the resource. The localized friendly form of the resource related to this action/operation – it should match the public documentation for the resource provider. It should use Title Casing. This value should be unique for a particular URL type (e.g. nested types should *not* reuse their parent’s display.resource field). e.g. "Virtual Machines" or "Scheduler Job Collections", or "Virtual Machine VM Sizes" or "Scheduler Jobs". + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Set the resource. The localized friendly form of the resource related to this action/operation – it should match the public documentation for the resource provider. It should use Title Casing. This value should be unique for a particular URL type (e.g. nested types should *not* reuse their parent’s display.resource field). e.g. "Virtual Machines" or "Scheduler Job Collections", or "Virtual Machine VM Sizes" or "Scheduler Jobs". + * + * @param resource the resource value to set + * @return the Display object itself. + */ + public Display withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get the operation. The localized friendly name for the operation, as it should be shown to the user. It should be concise (to fit in drop downs) but clear (i.e. self-documenting). It should use Title Casing. Prescriptive guidance: Read Create or Update Delete 'ActionName'. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Set the operation. The localized friendly name for the operation, as it should be shown to the user. It should be concise (to fit in drop downs) but clear (i.e. self-documenting). It should use Title Casing. Prescriptive guidance: Read Create or Update Delete 'ActionName'. + * + * @param operation the operation value to set + * @return the Display object itself. + */ + public Display withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get the description. The localized friendly description for the operation, as it should be shown to the user. It should be thorough, yet concise – it will be used in tool tips and detailed views. Prescriptive guidance for namespaces: Read any 'display.provider' resource Create or Update any 'display.provider' resource Delete any 'display.provider' resource Perform any other action on any 'display.provider' resource Prescriptive guidance for namespaces: Read any 'display.resource' Create or Update any 'display.resource' Delete any 'display.resource' 'ActionName' any 'display.resources'. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description. The localized friendly description for the operation, as it should be shown to the user. It should be thorough, yet concise – it will be used in tool tips and detailed views. Prescriptive guidance for namespaces: Read any 'display.provider' resource Create or Update any 'display.provider' resource Delete any 'display.provider' resource Perform any other action on any 'display.provider' resource Prescriptive guidance for namespaces: Read any 'display.resource' Create or Update any 'display.resource' Delete any 'display.resource' 'ActionName' any 'display.resources'. + * + * @param description the description value to set + * @return the Display object itself. + */ + public Display withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EnableProtectionInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EnableProtectionInput.java new file mode 100644 index 0000000000000..51e1fed7d5b54 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EnableProtectionInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Enable protection input. + */ +public class EnableProtectionInput { + /** + * Enable protection input properties. + */ + @JsonProperty(value = "properties") + private EnableProtectionInputProperties properties; + + /** + * Get enable protection input properties. + * + * @return the properties value + */ + public EnableProtectionInputProperties properties() { + return this.properties; + } + + /** + * Set enable protection input properties. + * + * @param properties the properties value to set + * @return the EnableProtectionInput object itself. + */ + public EnableProtectionInput withProperties(EnableProtectionInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EnableProtectionInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EnableProtectionInputProperties.java new file mode 100644 index 0000000000000..7c6a55cb800d6 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EnableProtectionInputProperties.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Enable protection input properties. + */ +public class EnableProtectionInputProperties { + /** + * The Policy Id. + */ + @JsonProperty(value = "policyId") + private String policyId; + + /** + * The protectable item Id. + */ + @JsonProperty(value = "protectableItemId") + private String protectableItemId; + + /** + * The ReplicationProviderInput. For HyperVReplicaAzure provider, it will + * be AzureEnableProtectionInput object. For San provider, it will be + * SanEnableProtectionInput object. For HyperVReplicaAzure provider, it can + * be null. + */ + @JsonProperty(value = "providerSpecificDetails") + private EnableProtectionProviderSpecificInput providerSpecificDetails; + + /** + * Get the Policy Id. + * + * @return the policyId value + */ + public String policyId() { + return this.policyId; + } + + /** + * Set the Policy Id. + * + * @param policyId the policyId value to set + * @return the EnableProtectionInputProperties object itself. + */ + public EnableProtectionInputProperties withPolicyId(String policyId) { + this.policyId = policyId; + return this; + } + + /** + * Get the protectable item Id. + * + * @return the protectableItemId value + */ + public String protectableItemId() { + return this.protectableItemId; + } + + /** + * Set the protectable item Id. + * + * @param protectableItemId the protectableItemId value to set + * @return the EnableProtectionInputProperties object itself. + */ + public EnableProtectionInputProperties withProtectableItemId(String protectableItemId) { + this.protectableItemId = protectableItemId; + return this; + } + + /** + * Get the ReplicationProviderInput. For HyperVReplicaAzure provider, it will be AzureEnableProtectionInput object. For San provider, it will be SanEnableProtectionInput object. For HyperVReplicaAzure provider, it can be null. + * + * @return the providerSpecificDetails value + */ + public EnableProtectionProviderSpecificInput providerSpecificDetails() { + return this.providerSpecificDetails; + } + + /** + * Set the ReplicationProviderInput. For HyperVReplicaAzure provider, it will be AzureEnableProtectionInput object. For San provider, it will be SanEnableProtectionInput object. For HyperVReplicaAzure provider, it can be null. + * + * @param providerSpecificDetails the providerSpecificDetails value to set + * @return the EnableProtectionInputProperties object itself. + */ + public EnableProtectionInputProperties withProviderSpecificDetails(EnableProtectionProviderSpecificInput providerSpecificDetails) { + this.providerSpecificDetails = providerSpecificDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EnableProtectionProviderSpecificInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EnableProtectionProviderSpecificInput.java new file mode 100644 index 0000000000000..46aad773918d5 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EnableProtectionProviderSpecificInput.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Enable protection provider specific input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("EnableProtectionProviderSpecificInput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "HyperVReplicaAzure", value = HyperVReplicaAzureEnableProtectionInput.class), + @JsonSubTypes.Type(name = "San", value = SanEnableProtectionInput.class), + @JsonSubTypes.Type(name = "InMageAzureV2", value = InMageAzureV2EnableProtectionInput.class), + @JsonSubTypes.Type(name = "InMage", value = InMageEnableProtectionInput.class), + @JsonSubTypes.Type(name = "A2A", value = A2AEnableProtectionInput.class) +}) +public class EnableProtectionProviderSpecificInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EncryptionDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EncryptionDetails.java new file mode 100644 index 0000000000000..458f986f7ade4 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EncryptionDetails.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.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Encryption details for the fabric. + */ +public class EncryptionDetails { + /** + * The key encryption key state for the Vmm. + */ + @JsonProperty(value = "kekState") + private String kekState; + + /** + * The key encryption key certificate thumbprint. + */ + @JsonProperty(value = "kekCertThumbprint") + private String kekCertThumbprint; + + /** + * The key encryption key certificate expiry date. + */ + @JsonProperty(value = "kekCertExpiryDate") + private DateTime kekCertExpiryDate; + + /** + * Get the key encryption key state for the Vmm. + * + * @return the kekState value + */ + public String kekState() { + return this.kekState; + } + + /** + * Set the key encryption key state for the Vmm. + * + * @param kekState the kekState value to set + * @return the EncryptionDetails object itself. + */ + public EncryptionDetails withKekState(String kekState) { + this.kekState = kekState; + return this; + } + + /** + * Get the key encryption key certificate thumbprint. + * + * @return the kekCertThumbprint value + */ + public String kekCertThumbprint() { + return this.kekCertThumbprint; + } + + /** + * Set the key encryption key certificate thumbprint. + * + * @param kekCertThumbprint the kekCertThumbprint value to set + * @return the EncryptionDetails object itself. + */ + public EncryptionDetails withKekCertThumbprint(String kekCertThumbprint) { + this.kekCertThumbprint = kekCertThumbprint; + return this; + } + + /** + * Get the key encryption key certificate expiry date. + * + * @return the kekCertExpiryDate value + */ + public DateTime kekCertExpiryDate() { + return this.kekCertExpiryDate; + } + + /** + * Set the key encryption key certificate expiry date. + * + * @param kekCertExpiryDate the kekCertExpiryDate value to set + * @return the EncryptionDetails object itself. + */ + public EncryptionDetails withKekCertExpiryDate(DateTime kekCertExpiryDate) { + this.kekCertExpiryDate = kekCertExpiryDate; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Event.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Event.java new file mode 100644 index 0000000000000..52f71b0588085 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Event.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.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.EventInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; + +/** + * Type representing Event. + */ +public interface Event extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + EventProperties properties(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EventProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EventProperties.java new file mode 100644 index 0000000000000..1499787538b2f --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EventProperties.java @@ -0,0 +1,282 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of a monitoring event. + */ +public class EventProperties { + /** + * The Id of the monitoring event. + */ + @JsonProperty(value = "eventCode") + private String eventCode; + + /** + * The event name. + */ + @JsonProperty(value = "description") + private String description; + + /** + * The type of the event. for example: VM Health, Server Health, Job + * Failure etc. + */ + @JsonProperty(value = "eventType") + private String eventType; + + /** + * The friendly name of the source of the event on which it is raised (for + * example, VM, VMM etc). + */ + @JsonProperty(value = "affectedObjectFriendlyName") + private String affectedObjectFriendlyName; + + /** + * The severity of the event. + */ + @JsonProperty(value = "severity") + private String severity; + + /** + * The time of occurence of the event. + */ + @JsonProperty(value = "timeOfOccurrence") + private DateTime timeOfOccurrence; + + /** + * The ARM ID of the fabric. + */ + @JsonProperty(value = "fabricId") + private String fabricId; + + /** + * The provider specific settings. + */ + @JsonProperty(value = "providerSpecificDetails") + private EventProviderSpecificDetails providerSpecificDetails; + + /** + * The event specific settings. + */ + @JsonProperty(value = "eventSpecificDetails") + private EventSpecificDetails eventSpecificDetails; + + /** + * The list of errors / warnings capturing details associated with the + * issue(s). + */ + @JsonProperty(value = "healthErrors") + private List healthErrors; + + /** + * Get the Id of the monitoring event. + * + * @return the eventCode value + */ + public String eventCode() { + return this.eventCode; + } + + /** + * Set the Id of the monitoring event. + * + * @param eventCode the eventCode value to set + * @return the EventProperties object itself. + */ + public EventProperties withEventCode(String eventCode) { + this.eventCode = eventCode; + return this; + } + + /** + * Get the event name. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the event name. + * + * @param description the description value to set + * @return the EventProperties object itself. + */ + public EventProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the type of the event. for example: VM Health, Server Health, Job Failure etc. + * + * @return the eventType value + */ + public String eventType() { + return this.eventType; + } + + /** + * Set the type of the event. for example: VM Health, Server Health, Job Failure etc. + * + * @param eventType the eventType value to set + * @return the EventProperties object itself. + */ + public EventProperties withEventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * Get the friendly name of the source of the event on which it is raised (for example, VM, VMM etc). + * + * @return the affectedObjectFriendlyName value + */ + public String affectedObjectFriendlyName() { + return this.affectedObjectFriendlyName; + } + + /** + * Set the friendly name of the source of the event on which it is raised (for example, VM, VMM etc). + * + * @param affectedObjectFriendlyName the affectedObjectFriendlyName value to set + * @return the EventProperties object itself. + */ + public EventProperties withAffectedObjectFriendlyName(String affectedObjectFriendlyName) { + this.affectedObjectFriendlyName = affectedObjectFriendlyName; + return this; + } + + /** + * Get the severity of the event. + * + * @return the severity value + */ + public String severity() { + return this.severity; + } + + /** + * Set the severity of the event. + * + * @param severity the severity value to set + * @return the EventProperties object itself. + */ + public EventProperties withSeverity(String severity) { + this.severity = severity; + return this; + } + + /** + * Get the time of occurence of the event. + * + * @return the timeOfOccurrence value + */ + public DateTime timeOfOccurrence() { + return this.timeOfOccurrence; + } + + /** + * Set the time of occurence of the event. + * + * @param timeOfOccurrence the timeOfOccurrence value to set + * @return the EventProperties object itself. + */ + public EventProperties withTimeOfOccurrence(DateTime timeOfOccurrence) { + this.timeOfOccurrence = timeOfOccurrence; + return this; + } + + /** + * Get the ARM ID of the fabric. + * + * @return the fabricId value + */ + public String fabricId() { + return this.fabricId; + } + + /** + * Set the ARM ID of the fabric. + * + * @param fabricId the fabricId value to set + * @return the EventProperties object itself. + */ + public EventProperties withFabricId(String fabricId) { + this.fabricId = fabricId; + return this; + } + + /** + * Get the provider specific settings. + * + * @return the providerSpecificDetails value + */ + public EventProviderSpecificDetails providerSpecificDetails() { + return this.providerSpecificDetails; + } + + /** + * Set the provider specific settings. + * + * @param providerSpecificDetails the providerSpecificDetails value to set + * @return the EventProperties object itself. + */ + public EventProperties withProviderSpecificDetails(EventProviderSpecificDetails providerSpecificDetails) { + this.providerSpecificDetails = providerSpecificDetails; + return this; + } + + /** + * Get the event specific settings. + * + * @return the eventSpecificDetails value + */ + public EventSpecificDetails eventSpecificDetails() { + return this.eventSpecificDetails; + } + + /** + * Set the event specific settings. + * + * @param eventSpecificDetails the eventSpecificDetails value to set + * @return the EventProperties object itself. + */ + public EventProperties withEventSpecificDetails(EventSpecificDetails eventSpecificDetails) { + this.eventSpecificDetails = eventSpecificDetails; + return this; + } + + /** + * Get the list of errors / warnings capturing details associated with the issue(s). + * + * @return the healthErrors value + */ + public List healthErrors() { + return this.healthErrors; + } + + /** + * Set the list of errors / warnings capturing details associated with the issue(s). + * + * @param healthErrors the healthErrors value to set + * @return the EventProperties object itself. + */ + public EventProperties withHealthErrors(List healthErrors) { + this.healthErrors = healthErrors; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EventProviderSpecificDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EventProviderSpecificDetails.java new file mode 100644 index 0000000000000..53eb53e3166da --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EventProviderSpecificDetails.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Model class for provider specific details for an event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("EventProviderSpecificDetails") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "HyperVReplicaBaseEventDetails", value = HyperVReplicaBaseEventDetails.class), + @JsonSubTypes.Type(name = "HyperVReplica2012", value = HyperVReplica2012EventDetails.class), + @JsonSubTypes.Type(name = "HyperVReplica2012R2", value = HyperVReplica2012R2EventDetails.class), + @JsonSubTypes.Type(name = "HyperVReplicaAzure", value = HyperVReplicaAzureEventDetails.class), + @JsonSubTypes.Type(name = "A2A", value = A2AEventDetails.class), + @JsonSubTypes.Type(name = "InMageAzureV2", value = InMageAzureV2EventDetails.class) +}) +public class EventProviderSpecificDetails { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EventQueryParameter.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EventQueryParameter.java new file mode 100644 index 0000000000000..e51ea7b289cea --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EventQueryParameter.java @@ -0,0 +1,202 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Implements the event query parameter. + */ +public class EventQueryParameter { + /** + * The source id of the events to be queried. + */ + @JsonProperty(value = "EventCode") + private String eventCode; + + /** + * The severity of the events to be queried. + */ + @JsonProperty(value = "Severity") + private String severity; + + /** + * The type of the events to be queried. + */ + @JsonProperty(value = "EventType") + private String eventType; + + /** + * The affected object server id of the events to be queried. + */ + @JsonProperty(value = "FabricName") + private String fabricName; + + /** + * The affected object name of the events to be queried. + */ + @JsonProperty(value = "AffectedObjectFriendlyName") + private String affectedObjectFriendlyName; + + /** + * The start time of the time range within which the events are to be + * queried. + */ + @JsonProperty(value = "StartTime") + private DateTime startTime; + + /** + * The end time of the time range within which the events are to be + * queried. + */ + @JsonProperty(value = "EndTime") + private DateTime endTime; + + /** + * Get the source id of the events to be queried. + * + * @return the eventCode value + */ + public String eventCode() { + return this.eventCode; + } + + /** + * Set the source id of the events to be queried. + * + * @param eventCode the eventCode value to set + * @return the EventQueryParameter object itself. + */ + public EventQueryParameter withEventCode(String eventCode) { + this.eventCode = eventCode; + return this; + } + + /** + * Get the severity of the events to be queried. + * + * @return the severity value + */ + public String severity() { + return this.severity; + } + + /** + * Set the severity of the events to be queried. + * + * @param severity the severity value to set + * @return the EventQueryParameter object itself. + */ + public EventQueryParameter withSeverity(String severity) { + this.severity = severity; + return this; + } + + /** + * Get the type of the events to be queried. + * + * @return the eventType value + */ + public String eventType() { + return this.eventType; + } + + /** + * Set the type of the events to be queried. + * + * @param eventType the eventType value to set + * @return the EventQueryParameter object itself. + */ + public EventQueryParameter withEventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * Get the affected object server id of the events to be queried. + * + * @return the fabricName value + */ + public String fabricName() { + return this.fabricName; + } + + /** + * Set the affected object server id of the events to be queried. + * + * @param fabricName the fabricName value to set + * @return the EventQueryParameter object itself. + */ + public EventQueryParameter withFabricName(String fabricName) { + this.fabricName = fabricName; + return this; + } + + /** + * Get the affected object name of the events to be queried. + * + * @return the affectedObjectFriendlyName value + */ + public String affectedObjectFriendlyName() { + return this.affectedObjectFriendlyName; + } + + /** + * Set the affected object name of the events to be queried. + * + * @param affectedObjectFriendlyName the affectedObjectFriendlyName value to set + * @return the EventQueryParameter object itself. + */ + public EventQueryParameter withAffectedObjectFriendlyName(String affectedObjectFriendlyName) { + this.affectedObjectFriendlyName = affectedObjectFriendlyName; + return this; + } + + /** + * Get the start time of the time range within which the events are to be queried. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the start time of the time range within which the events are to be queried. + * + * @param startTime the startTime value to set + * @return the EventQueryParameter object itself. + */ + public EventQueryParameter withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the end time of the time range within which the events are to be queried. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set the end time of the time range within which the events are to be queried. + * + * @param endTime the endTime value to set + * @return the EventQueryParameter object itself. + */ + public EventQueryParameter withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EventSpecificDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EventSpecificDetails.java new file mode 100644 index 0000000000000..105f3a2f28dc7 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/EventSpecificDetails.java @@ -0,0 +1,24 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Model class for event specific details for an event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("EventSpecificDetails") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "JobStatus", value = JobStatusEventDetails.class) +}) +public class EventSpecificDetails { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ExportJobDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ExportJobDetails.java new file mode 100644 index 0000000000000..3ab33601a79fb --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ExportJobDetails.java @@ -0,0 +1,73 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * This class represents details for export jobs workflow. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("ExportJobDetails") +public class ExportJobDetails extends JobDetails { + /** + * BlobUri of the exported jobs. + */ + @JsonProperty(value = "blobUri") + private String blobUri; + + /** + * The sas token to access blob. + */ + @JsonProperty(value = "sasToken") + private String sasToken; + + /** + * Get blobUri of the exported jobs. + * + * @return the blobUri value + */ + public String blobUri() { + return this.blobUri; + } + + /** + * Set blobUri of the exported jobs. + * + * @param blobUri the blobUri value to set + * @return the ExportJobDetails object itself. + */ + public ExportJobDetails withBlobUri(String blobUri) { + this.blobUri = blobUri; + return this; + } + + /** + * Get the sas token to access blob. + * + * @return the sasToken value + */ + public String sasToken() { + return this.sasToken; + } + + /** + * Set the sas token to access blob. + * + * @param sasToken the sasToken value to set + * @return the ExportJobDetails object itself. + */ + public ExportJobDetails withSasToken(String sasToken) { + this.sasToken = sasToken; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Fabric.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Fabric.java new file mode 100644 index 0000000000000..82b2e6ba7be42 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Fabric.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.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.FabricInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; + +/** + * Type representing Fabric. + */ +public interface Fabric extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + FabricProperties properties(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the Fabric definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithVault, DefinitionStages.WithCreate { + } + + /** + * Grouping of Fabric definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Fabric definition. + */ + interface Blank extends WithVault { + } + + /** + * The stage of the fabric definition allowing to specify Vault. + */ + interface WithVault { + /** + * Specifies . + */ + WithCreate withExistingVault(); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a Fabric update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable { + } + + /** + * Grouping of Fabric update stages. + */ + interface UpdateStages { + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricCreationInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricCreationInput.java new file mode 100644 index 0000000000000..61024d9fe6f73 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricCreationInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Site details provided during the time of site creation. + */ +public class FabricCreationInput { + /** + * Fabric creation input. + */ + @JsonProperty(value = "properties") + private FabricCreationInputProperties properties; + + /** + * Get fabric creation input. + * + * @return the properties value + */ + public FabricCreationInputProperties properties() { + return this.properties; + } + + /** + * Set fabric creation input. + * + * @param properties the properties value to set + * @return the FabricCreationInput object itself. + */ + public FabricCreationInput withProperties(FabricCreationInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricCreationInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricCreationInputProperties.java new file mode 100644 index 0000000000000..ed44e8c68fb15 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricCreationInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of site details provided during the time of site creation. + */ +public class FabricCreationInputProperties { + /** + * Fabric provider specific creation input. + */ + @JsonProperty(value = "customDetails") + private FabricSpecificCreationInput customDetails; + + /** + * Get fabric provider specific creation input. + * + * @return the customDetails value + */ + public FabricSpecificCreationInput customDetails() { + return this.customDetails; + } + + /** + * Set fabric provider specific creation input. + * + * @param customDetails the customDetails value to set + * @return the FabricCreationInputProperties object itself. + */ + public FabricCreationInputProperties withCustomDetails(FabricSpecificCreationInput customDetails) { + this.customDetails = customDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricProperties.java new file mode 100644 index 0000000000000..619ff8fa1643f --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Fabric properties. + */ +public class FabricProperties { + /** + * Friendly name of the fabric. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * Encryption details for the fabric. + */ + @JsonProperty(value = "encryptionDetails") + private EncryptionDetails encryptionDetails; + + /** + * Rollover encryption details for the fabric. + */ + @JsonProperty(value = "rolloverEncryptionDetails") + private EncryptionDetails rolloverEncryptionDetails; + + /** + * Dra Registration Id. + */ + @JsonProperty(value = "internalIdentifier") + private String internalIdentifier; + + /** + * BCDR state of the fabric. + */ + @JsonProperty(value = "bcdrState") + private String bcdrState; + + /** + * Fabric specific settings. + */ + @JsonProperty(value = "customDetails") + private FabricSpecificDetails customDetails; + + /** + * Fabric health error details. + */ + @JsonProperty(value = "healthErrorDetails") + private List healthErrorDetails; + + /** + * Health of fabric. + */ + @JsonProperty(value = "health") + private String health; + + /** + * Get friendly name of the fabric. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set friendly name of the fabric. + * + * @param friendlyName the friendlyName value to set + * @return the FabricProperties object itself. + */ + public FabricProperties withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get encryption details for the fabric. + * + * @return the encryptionDetails value + */ + public EncryptionDetails encryptionDetails() { + return this.encryptionDetails; + } + + /** + * Set encryption details for the fabric. + * + * @param encryptionDetails the encryptionDetails value to set + * @return the FabricProperties object itself. + */ + public FabricProperties withEncryptionDetails(EncryptionDetails encryptionDetails) { + this.encryptionDetails = encryptionDetails; + return this; + } + + /** + * Get rollover encryption details for the fabric. + * + * @return the rolloverEncryptionDetails value + */ + public EncryptionDetails rolloverEncryptionDetails() { + return this.rolloverEncryptionDetails; + } + + /** + * Set rollover encryption details for the fabric. + * + * @param rolloverEncryptionDetails the rolloverEncryptionDetails value to set + * @return the FabricProperties object itself. + */ + public FabricProperties withRolloverEncryptionDetails(EncryptionDetails rolloverEncryptionDetails) { + this.rolloverEncryptionDetails = rolloverEncryptionDetails; + return this; + } + + /** + * Get dra Registration Id. + * + * @return the internalIdentifier value + */ + public String internalIdentifier() { + return this.internalIdentifier; + } + + /** + * Set dra Registration Id. + * + * @param internalIdentifier the internalIdentifier value to set + * @return the FabricProperties object itself. + */ + public FabricProperties withInternalIdentifier(String internalIdentifier) { + this.internalIdentifier = internalIdentifier; + return this; + } + + /** + * Get bCDR state of the fabric. + * + * @return the bcdrState value + */ + public String bcdrState() { + return this.bcdrState; + } + + /** + * Set bCDR state of the fabric. + * + * @param bcdrState the bcdrState value to set + * @return the FabricProperties object itself. + */ + public FabricProperties withBcdrState(String bcdrState) { + this.bcdrState = bcdrState; + return this; + } + + /** + * Get fabric specific settings. + * + * @return the customDetails value + */ + public FabricSpecificDetails customDetails() { + return this.customDetails; + } + + /** + * Set fabric specific settings. + * + * @param customDetails the customDetails value to set + * @return the FabricProperties object itself. + */ + public FabricProperties withCustomDetails(FabricSpecificDetails customDetails) { + this.customDetails = customDetails; + return this; + } + + /** + * Get fabric health error details. + * + * @return the healthErrorDetails value + */ + public List healthErrorDetails() { + return this.healthErrorDetails; + } + + /** + * Set fabric health error details. + * + * @param healthErrorDetails the healthErrorDetails value to set + * @return the FabricProperties object itself. + */ + public FabricProperties withHealthErrorDetails(List healthErrorDetails) { + this.healthErrorDetails = healthErrorDetails; + return this; + } + + /** + * Get health of fabric. + * + * @return the health value + */ + public String health() { + return this.health; + } + + /** + * Set health of fabric. + * + * @param health the health value to set + * @return the FabricProperties object itself. + */ + public FabricProperties withHealth(String health) { + this.health = health; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricReplicationGroupTaskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricReplicationGroupTaskDetails.java new file mode 100644 index 0000000000000..8d907e7970638 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricReplicationGroupTaskDetails.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * This class represents the fabric replication group task details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("FabricReplicationGroupTaskDetails") +public class FabricReplicationGroupTaskDetails extends TaskTypeDetails { + /** + * The skipped reason. + */ + @JsonProperty(value = "skippedReason") + private String skippedReason; + + /** + * The skipped reason string. + */ + @JsonProperty(value = "skippedReasonString") + private String skippedReasonString; + + /** + * The job entity. + */ + @JsonProperty(value = "jobTask") + private JobEntity jobTask; + + /** + * Get the skipped reason. + * + * @return the skippedReason value + */ + public String skippedReason() { + return this.skippedReason; + } + + /** + * Set the skipped reason. + * + * @param skippedReason the skippedReason value to set + * @return the FabricReplicationGroupTaskDetails object itself. + */ + public FabricReplicationGroupTaskDetails withSkippedReason(String skippedReason) { + this.skippedReason = skippedReason; + return this; + } + + /** + * Get the skipped reason string. + * + * @return the skippedReasonString value + */ + public String skippedReasonString() { + return this.skippedReasonString; + } + + /** + * Set the skipped reason string. + * + * @param skippedReasonString the skippedReasonString value to set + * @return the FabricReplicationGroupTaskDetails object itself. + */ + public FabricReplicationGroupTaskDetails withSkippedReasonString(String skippedReasonString) { + this.skippedReasonString = skippedReasonString; + return this; + } + + /** + * Get the job entity. + * + * @return the jobTask value + */ + public JobEntity jobTask() { + return this.jobTask; + } + + /** + * Set the job entity. + * + * @param jobTask the jobTask value to set + * @return the FabricReplicationGroupTaskDetails object itself. + */ + public FabricReplicationGroupTaskDetails withJobTask(JobEntity jobTask) { + this.jobTask = jobTask; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricSpecificCreateNetworkMappingInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricSpecificCreateNetworkMappingInput.java new file mode 100644 index 0000000000000..3cbbeed48e135 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricSpecificCreateNetworkMappingInput.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Input details specific to fabrics during Network Mapping. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("FabricSpecificCreateNetworkMappingInput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AzureToAzure", value = AzureToAzureCreateNetworkMappingInput.class), + @JsonSubTypes.Type(name = "VmmToAzure", value = VmmToAzureCreateNetworkMappingInput.class), + @JsonSubTypes.Type(name = "VmmToVmm", value = VmmToVmmCreateNetworkMappingInput.class) +}) +public class FabricSpecificCreateNetworkMappingInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricSpecificCreationInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricSpecificCreationInput.java new file mode 100644 index 0000000000000..de8352998e1ae --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricSpecificCreationInput.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Fabric provider specific settings. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("FabricSpecificCreationInput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Azure", value = AzureFabricCreationInput.class), + @JsonSubTypes.Type(name = "VMwareV2", value = VMwareV2FabricCreationInput.class) +}) +public class FabricSpecificCreationInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricSpecificDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricSpecificDetails.java new file mode 100644 index 0000000000000..bd85c1f99fdeb --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricSpecificDetails.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Fabric specific details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("FabricSpecificDetails") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Azure", value = AzureFabricSpecificDetails.class), + @JsonSubTypes.Type(name = "VMM", value = VmmDetails.class), + @JsonSubTypes.Type(name = "HyperVSite", value = HyperVSiteDetails.class), + @JsonSubTypes.Type(name = "VMware", value = VMwareDetails.class), + @JsonSubTypes.Type(name = "VMwareV2", value = VMwareV2FabricSpecificDetails.class) +}) +public class FabricSpecificDetails { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricSpecificUpdateNetworkMappingInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricSpecificUpdateNetworkMappingInput.java new file mode 100644 index 0000000000000..9171f0bf18d6e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FabricSpecificUpdateNetworkMappingInput.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Input details specific to fabrics during Network Mapping. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("FabricSpecificUpdateNetworkMappingInput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AzureToAzure", value = AzureToAzureUpdateNetworkMappingInput.class), + @JsonSubTypes.Type(name = "VmmToAzure", value = VmmToAzureUpdateNetworkMappingInput.class), + @JsonSubTypes.Type(name = "VmmToVmm", value = VmmToVmmUpdateNetworkMappingInput.class) +}) +public class FabricSpecificUpdateNetworkMappingInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverDeploymentModel.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverDeploymentModel.java new file mode 100644 index 0000000000000..3f8206db98357 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverDeploymentModel.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for FailoverDeploymentModel. + */ +public enum FailoverDeploymentModel { + /** Enum value NotApplicable. */ + NOT_APPLICABLE("NotApplicable"), + + /** Enum value Classic. */ + CLASSIC("Classic"), + + /** Enum value ResourceManager. */ + RESOURCE_MANAGER("ResourceManager"); + + /** The actual serialized value for a FailoverDeploymentModel instance. */ + private String value; + + FailoverDeploymentModel(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a FailoverDeploymentModel instance. + * + * @param value the serialized value to parse. + * @return the parsed FailoverDeploymentModel object, or null if unable to parse. + */ + @JsonCreator + public static FailoverDeploymentModel fromString(String value) { + FailoverDeploymentModel[] items = FailoverDeploymentModel.values(); + for (FailoverDeploymentModel item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverJobDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverJobDetails.java new file mode 100644 index 0000000000000..7efde61d26952 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverJobDetails.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * This class represents the details for a failover job. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("FailoverJobDetails") +public class FailoverJobDetails extends JobDetails { + /** + * The test VM details. + */ + @JsonProperty(value = "protectedItemDetails") + private List protectedItemDetails; + + /** + * Get the test VM details. + * + * @return the protectedItemDetails value + */ + public List protectedItemDetails() { + return this.protectedItemDetails; + } + + /** + * Set the test VM details. + * + * @param protectedItemDetails the protectedItemDetails value to set + * @return the FailoverJobDetails object itself. + */ + public FailoverJobDetails withProtectedItemDetails(List protectedItemDetails) { + this.protectedItemDetails = protectedItemDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverProcessServerRequest.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverProcessServerRequest.java new file mode 100644 index 0000000000000..47d2d8c8aec90 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverProcessServerRequest.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Request to failover a process server. + */ +public class FailoverProcessServerRequest { + /** + * The properties of the PS Failover request. + */ + @JsonProperty(value = "properties") + private FailoverProcessServerRequestProperties properties; + + /** + * Get the properties of the PS Failover request. + * + * @return the properties value + */ + public FailoverProcessServerRequestProperties properties() { + return this.properties; + } + + /** + * Set the properties of the PS Failover request. + * + * @param properties the properties value to set + * @return the FailoverProcessServerRequest object itself. + */ + public FailoverProcessServerRequest withProperties(FailoverProcessServerRequestProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverProcessServerRequestProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverProcessServerRequestProperties.java new file mode 100644 index 0000000000000..92026a6ce4faf --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverProcessServerRequestProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of the Failover Process Server request. + */ +public class FailoverProcessServerRequestProperties { + /** + * The container identifier. + */ + @JsonProperty(value = "containerName") + private String containerName; + + /** + * The source process server. + */ + @JsonProperty(value = "sourceProcessServerId") + private String sourceProcessServerId; + + /** + * The new process server. + */ + @JsonProperty(value = "targetProcessServerId") + private String targetProcessServerId; + + /** + * The VMS to migrate. + */ + @JsonProperty(value = "vmsToMigrate") + private List vmsToMigrate; + + /** + * A value for failover type. It can be systemlevel/serverlevel. + */ + @JsonProperty(value = "updateType") + private String updateType; + + /** + * Get the container identifier. + * + * @return the containerName value + */ + public String containerName() { + return this.containerName; + } + + /** + * Set the container identifier. + * + * @param containerName the containerName value to set + * @return the FailoverProcessServerRequestProperties object itself. + */ + public FailoverProcessServerRequestProperties withContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get the source process server. + * + * @return the sourceProcessServerId value + */ + public String sourceProcessServerId() { + return this.sourceProcessServerId; + } + + /** + * Set the source process server. + * + * @param sourceProcessServerId the sourceProcessServerId value to set + * @return the FailoverProcessServerRequestProperties object itself. + */ + public FailoverProcessServerRequestProperties withSourceProcessServerId(String sourceProcessServerId) { + this.sourceProcessServerId = sourceProcessServerId; + return this; + } + + /** + * Get the new process server. + * + * @return the targetProcessServerId value + */ + public String targetProcessServerId() { + return this.targetProcessServerId; + } + + /** + * Set the new process server. + * + * @param targetProcessServerId the targetProcessServerId value to set + * @return the FailoverProcessServerRequestProperties object itself. + */ + public FailoverProcessServerRequestProperties withTargetProcessServerId(String targetProcessServerId) { + this.targetProcessServerId = targetProcessServerId; + return this; + } + + /** + * Get the VMS to migrate. + * + * @return the vmsToMigrate value + */ + public List vmsToMigrate() { + return this.vmsToMigrate; + } + + /** + * Set the VMS to migrate. + * + * @param vmsToMigrate the vmsToMigrate value to set + * @return the FailoverProcessServerRequestProperties object itself. + */ + public FailoverProcessServerRequestProperties withVmsToMigrate(List vmsToMigrate) { + this.vmsToMigrate = vmsToMigrate; + return this; + } + + /** + * Get a value for failover type. It can be systemlevel/serverlevel. + * + * @return the updateType value + */ + public String updateType() { + return this.updateType; + } + + /** + * Set a value for failover type. It can be systemlevel/serverlevel. + * + * @param updateType the updateType value to set + * @return the FailoverProcessServerRequestProperties object itself. + */ + public FailoverProcessServerRequestProperties withUpdateType(String updateType) { + this.updateType = updateType; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverReplicationProtectedItemDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverReplicationProtectedItemDetails.java new file mode 100644 index 0000000000000..392e5777394c0 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/FailoverReplicationProtectedItemDetails.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.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Failover details for a replication protected item. + */ +public class FailoverReplicationProtectedItemDetails { + /** + * The name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The friendly name. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * The test Vm name. + */ + @JsonProperty(value = "testVmName") + private String testVmName; + + /** + * The test Vm friendly name. + */ + @JsonProperty(value = "testVmFriendlyName") + private String testVmFriendlyName; + + /** + * The network connection status. + */ + @JsonProperty(value = "networkConnectionStatus") + private String networkConnectionStatus; + + /** + * The network friendly name. + */ + @JsonProperty(value = "networkFriendlyName") + private String networkFriendlyName; + + /** + * The network subnet. + */ + @JsonProperty(value = "subnet") + private String subnet; + + /** + * The recovery point Id. + */ + @JsonProperty(value = "recoveryPointId") + private String recoveryPointId; + + /** + * The recovery point time. + */ + @JsonProperty(value = "recoveryPointTime") + private DateTime recoveryPointTime; + + /** + * Get the name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name. + * + * @param name the name value to set + * @return the FailoverReplicationProtectedItemDetails object itself. + */ + public FailoverReplicationProtectedItemDetails withName(String name) { + this.name = name; + return this; + } + + /** + * Get the friendly name. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the friendly name. + * + * @param friendlyName the friendlyName value to set + * @return the FailoverReplicationProtectedItemDetails object itself. + */ + public FailoverReplicationProtectedItemDetails withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the test Vm name. + * + * @return the testVmName value + */ + public String testVmName() { + return this.testVmName; + } + + /** + * Set the test Vm name. + * + * @param testVmName the testVmName value to set + * @return the FailoverReplicationProtectedItemDetails object itself. + */ + public FailoverReplicationProtectedItemDetails withTestVmName(String testVmName) { + this.testVmName = testVmName; + return this; + } + + /** + * Get the test Vm friendly name. + * + * @return the testVmFriendlyName value + */ + public String testVmFriendlyName() { + return this.testVmFriendlyName; + } + + /** + * Set the test Vm friendly name. + * + * @param testVmFriendlyName the testVmFriendlyName value to set + * @return the FailoverReplicationProtectedItemDetails object itself. + */ + public FailoverReplicationProtectedItemDetails withTestVmFriendlyName(String testVmFriendlyName) { + this.testVmFriendlyName = testVmFriendlyName; + return this; + } + + /** + * Get the network connection status. + * + * @return the networkConnectionStatus value + */ + public String networkConnectionStatus() { + return this.networkConnectionStatus; + } + + /** + * Set the network connection status. + * + * @param networkConnectionStatus the networkConnectionStatus value to set + * @return the FailoverReplicationProtectedItemDetails object itself. + */ + public FailoverReplicationProtectedItemDetails withNetworkConnectionStatus(String networkConnectionStatus) { + this.networkConnectionStatus = networkConnectionStatus; + return this; + } + + /** + * Get the network friendly name. + * + * @return the networkFriendlyName value + */ + public String networkFriendlyName() { + return this.networkFriendlyName; + } + + /** + * Set the network friendly name. + * + * @param networkFriendlyName the networkFriendlyName value to set + * @return the FailoverReplicationProtectedItemDetails object itself. + */ + public FailoverReplicationProtectedItemDetails withNetworkFriendlyName(String networkFriendlyName) { + this.networkFriendlyName = networkFriendlyName; + return this; + } + + /** + * Get the network subnet. + * + * @return the subnet value + */ + public String subnet() { + return this.subnet; + } + + /** + * Set the network subnet. + * + * @param subnet the subnet value to set + * @return the FailoverReplicationProtectedItemDetails object itself. + */ + public FailoverReplicationProtectedItemDetails withSubnet(String subnet) { + this.subnet = subnet; + return this; + } + + /** + * Get the recovery point Id. + * + * @return the recoveryPointId value + */ + public String recoveryPointId() { + return this.recoveryPointId; + } + + /** + * Set the recovery point Id. + * + * @param recoveryPointId the recoveryPointId value to set + * @return the FailoverReplicationProtectedItemDetails object itself. + */ + public FailoverReplicationProtectedItemDetails withRecoveryPointId(String recoveryPointId) { + this.recoveryPointId = recoveryPointId; + return this; + } + + /** + * Get the recovery point time. + * + * @return the recoveryPointTime value + */ + public DateTime recoveryPointTime() { + return this.recoveryPointTime; + } + + /** + * Set the recovery point time. + * + * @param recoveryPointTime the recoveryPointTime value to set + * @return the FailoverReplicationProtectedItemDetails object itself. + */ + public FailoverReplicationProtectedItemDetails withRecoveryPointTime(DateTime recoveryPointTime) { + this.recoveryPointTime = recoveryPointTime; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/GroupTaskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/GroupTaskDetails.java new file mode 100644 index 0000000000000..efb3dadf56c96 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/GroupTaskDetails.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * This class represents the group task details when parent child relationship + * exists in the drill down. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("GroupTaskDetails") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "InlineWorkflowTaskDetails", value = InlineWorkflowTaskDetails.class), + @JsonSubTypes.Type(name = "RecoveryPlanGroupTaskDetails", value = RecoveryPlanGroupTaskDetails.class), + @JsonSubTypes.Type(name = "RecoveryPlanShutdownGroupTaskDetails", value = RecoveryPlanShutdownGroupTaskDetails.class) +}) +public class GroupTaskDetails { + /** + * The child tasks. + */ + @JsonProperty(value = "childTasks") + private List childTasks; + + /** + * Get the child tasks. + * + * @return the childTasks value + */ + public List childTasks() { + return this.childTasks; + } + + /** + * Set the child tasks. + * + * @param childTasks the childTasks value to set + * @return the GroupTaskDetails object itself. + */ + public GroupTaskDetails withChildTasks(List childTasks) { + this.childTasks = childTasks; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HealthError.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HealthError.java new file mode 100644 index 0000000000000..f554fa484c395 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HealthError.java @@ -0,0 +1,305 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Health Error. + */ +public class HealthError { + /** + * Source of error. + */ + @JsonProperty(value = "errorSource") + private String errorSource; + + /** + * Type of error. + */ + @JsonProperty(value = "errorType") + private String errorType; + + /** + * Level of error. + */ + @JsonProperty(value = "errorLevel") + private String errorLevel; + + /** + * Error code. + */ + @JsonProperty(value = "errorCode") + private String errorCode; + + /** + * Error message. + */ + @JsonProperty(value = "errorMessage") + private String errorMessage; + + /** + * Possible causes of error. + */ + @JsonProperty(value = "possibleCauses") + private String possibleCauses; + + /** + * Recommended action to resolve error. + */ + @JsonProperty(value = "recommendedAction") + private String recommendedAction; + + /** + * Error creation time (UTC). + */ + @JsonProperty(value = "creationTimeUtc") + private DateTime creationTimeUtc; + + /** + * DRA error message. + */ + @JsonProperty(value = "recoveryProviderErrorMessage") + private String recoveryProviderErrorMessage; + + /** + * ID of the entity. + */ + @JsonProperty(value = "entityId") + private String entityId; + + /** + * The child health errors. + */ + @JsonProperty(value = "childErrors") + private List childErrors; + + /** + * Get source of error. + * + * @return the errorSource value + */ + public String errorSource() { + return this.errorSource; + } + + /** + * Set source of error. + * + * @param errorSource the errorSource value to set + * @return the HealthError object itself. + */ + public HealthError withErrorSource(String errorSource) { + this.errorSource = errorSource; + return this; + } + + /** + * Get type of error. + * + * @return the errorType value + */ + public String errorType() { + return this.errorType; + } + + /** + * Set type of error. + * + * @param errorType the errorType value to set + * @return the HealthError object itself. + */ + public HealthError withErrorType(String errorType) { + this.errorType = errorType; + return this; + } + + /** + * Get level of error. + * + * @return the errorLevel value + */ + public String errorLevel() { + return this.errorLevel; + } + + /** + * Set level of error. + * + * @param errorLevel the errorLevel value to set + * @return the HealthError object itself. + */ + public HealthError withErrorLevel(String errorLevel) { + this.errorLevel = errorLevel; + return this; + } + + /** + * Get error code. + * + * @return the errorCode value + */ + public String errorCode() { + return this.errorCode; + } + + /** + * Set error code. + * + * @param errorCode the errorCode value to set + * @return the HealthError object itself. + */ + public HealthError withErrorCode(String errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * Get error message. + * + * @return the errorMessage value + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Set error message. + * + * @param errorMessage the errorMessage value to set + * @return the HealthError object itself. + */ + public HealthError withErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Get possible causes of error. + * + * @return the possibleCauses value + */ + public String possibleCauses() { + return this.possibleCauses; + } + + /** + * Set possible causes of error. + * + * @param possibleCauses the possibleCauses value to set + * @return the HealthError object itself. + */ + public HealthError withPossibleCauses(String possibleCauses) { + this.possibleCauses = possibleCauses; + return this; + } + + /** + * Get recommended action to resolve error. + * + * @return the recommendedAction value + */ + public String recommendedAction() { + return this.recommendedAction; + } + + /** + * Set recommended action to resolve error. + * + * @param recommendedAction the recommendedAction value to set + * @return the HealthError object itself. + */ + public HealthError withRecommendedAction(String recommendedAction) { + this.recommendedAction = recommendedAction; + return this; + } + + /** + * Get error creation time (UTC). + * + * @return the creationTimeUtc value + */ + public DateTime creationTimeUtc() { + return this.creationTimeUtc; + } + + /** + * Set error creation time (UTC). + * + * @param creationTimeUtc the creationTimeUtc value to set + * @return the HealthError object itself. + */ + public HealthError withCreationTimeUtc(DateTime creationTimeUtc) { + this.creationTimeUtc = creationTimeUtc; + return this; + } + + /** + * Get dRA error message. + * + * @return the recoveryProviderErrorMessage value + */ + public String recoveryProviderErrorMessage() { + return this.recoveryProviderErrorMessage; + } + + /** + * Set dRA error message. + * + * @param recoveryProviderErrorMessage the recoveryProviderErrorMessage value to set + * @return the HealthError object itself. + */ + public HealthError withRecoveryProviderErrorMessage(String recoveryProviderErrorMessage) { + this.recoveryProviderErrorMessage = recoveryProviderErrorMessage; + return this; + } + + /** + * Get iD of the entity. + * + * @return the entityId value + */ + public String entityId() { + return this.entityId; + } + + /** + * Set iD of the entity. + * + * @param entityId the entityId value to set + * @return the HealthError object itself. + */ + public HealthError withEntityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * Get the child health errors. + * + * @return the childErrors value + */ + public List childErrors() { + return this.childErrors; + } + + /** + * Set the child health errors. + * + * @param childErrors the childErrors value to set + * @return the HealthError object itself. + */ + public HealthError withChildErrors(List childErrors) { + this.childErrors = childErrors; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HealthErrorCategory.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HealthErrorCategory.java new file mode 100644 index 0000000000000..ca0341bfd2880 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HealthErrorCategory.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for HealthErrorCategory. + */ +public enum HealthErrorCategory { + /** Enum value Replication. */ + REPLICATION("Replication"), + + /** Enum value TestFailover. */ + TEST_FAILOVER("TestFailover"), + + /** Enum value Configuration. */ + CONFIGURATION("Configuration"); + + /** The actual serialized value for a HealthErrorCategory instance. */ + private String value; + + HealthErrorCategory(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a HealthErrorCategory instance. + * + * @param value the serialized value to parse. + * @return the parsed HealthErrorCategory object, or null if unable to parse. + */ + @JsonCreator + public static HealthErrorCategory fromString(String value) { + HealthErrorCategory[] items = HealthErrorCategory.values(); + for (HealthErrorCategory item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HealthErrorSummary.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HealthErrorSummary.java new file mode 100644 index 0000000000000..816524f21e496 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HealthErrorSummary.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * class to define the summary of the health error details. + */ +public class HealthErrorSummary { + /** + * The code of the health error. + */ + @JsonProperty(value = "summaryCode") + private String summaryCode; + + /** + * The category of the health error. Possible values include: + * 'Replication', 'TestFailover', 'Configuration'. + */ + @JsonProperty(value = "category") + private HealthErrorCategory category; + + /** + * Severity of error. Possible values include: 'NONE', 'Warning', 'Error', + * 'Info'. + */ + @JsonProperty(value = "severity") + private Severity severity; + + /** + * The summary message of the health error. + */ + @JsonProperty(value = "summaryMessage") + private String summaryMessage; + + /** + * The type of affected ARM resource. + */ + @JsonProperty(value = "affectedResourceType") + private String affectedResourceType; + + /** + * The sub type of any subcomponent within the ARM resource that this might + * be applicable. Value remains null if not applicable. + */ + @JsonProperty(value = "affectedResourceSubtype") + private String affectedResourceSubtype; + + /** + * The list of affected resource correlation Ids. This can be used to + * uniquely identify the count of items affected by a specific category and + * severity as well as count of item affected by an specific issue. + */ + @JsonProperty(value = "affectedResourceCorrelationIds") + private List affectedResourceCorrelationIds; + + /** + * Get the code of the health error. + * + * @return the summaryCode value + */ + public String summaryCode() { + return this.summaryCode; + } + + /** + * Set the code of the health error. + * + * @param summaryCode the summaryCode value to set + * @return the HealthErrorSummary object itself. + */ + public HealthErrorSummary withSummaryCode(String summaryCode) { + this.summaryCode = summaryCode; + return this; + } + + /** + * Get the category of the health error. Possible values include: 'Replication', 'TestFailover', 'Configuration'. + * + * @return the category value + */ + public HealthErrorCategory category() { + return this.category; + } + + /** + * Set the category of the health error. Possible values include: 'Replication', 'TestFailover', 'Configuration'. + * + * @param category the category value to set + * @return the HealthErrorSummary object itself. + */ + public HealthErrorSummary withCategory(HealthErrorCategory category) { + this.category = category; + return this; + } + + /** + * Get severity of error. Possible values include: 'NONE', 'Warning', 'Error', 'Info'. + * + * @return the severity value + */ + public Severity severity() { + return this.severity; + } + + /** + * Set severity of error. Possible values include: 'NONE', 'Warning', 'Error', 'Info'. + * + * @param severity the severity value to set + * @return the HealthErrorSummary object itself. + */ + public HealthErrorSummary withSeverity(Severity severity) { + this.severity = severity; + return this; + } + + /** + * Get the summary message of the health error. + * + * @return the summaryMessage value + */ + public String summaryMessage() { + return this.summaryMessage; + } + + /** + * Set the summary message of the health error. + * + * @param summaryMessage the summaryMessage value to set + * @return the HealthErrorSummary object itself. + */ + public HealthErrorSummary withSummaryMessage(String summaryMessage) { + this.summaryMessage = summaryMessage; + return this; + } + + /** + * Get the type of affected ARM resource. + * + * @return the affectedResourceType value + */ + public String affectedResourceType() { + return this.affectedResourceType; + } + + /** + * Set the type of affected ARM resource. + * + * @param affectedResourceType the affectedResourceType value to set + * @return the HealthErrorSummary object itself. + */ + public HealthErrorSummary withAffectedResourceType(String affectedResourceType) { + this.affectedResourceType = affectedResourceType; + return this; + } + + /** + * Get the sub type of any subcomponent within the ARM resource that this might be applicable. Value remains null if not applicable. + * + * @return the affectedResourceSubtype value + */ + public String affectedResourceSubtype() { + return this.affectedResourceSubtype; + } + + /** + * Set the sub type of any subcomponent within the ARM resource that this might be applicable. Value remains null if not applicable. + * + * @param affectedResourceSubtype the affectedResourceSubtype value to set + * @return the HealthErrorSummary object itself. + */ + public HealthErrorSummary withAffectedResourceSubtype(String affectedResourceSubtype) { + this.affectedResourceSubtype = affectedResourceSubtype; + return this; + } + + /** + * Get the list of affected resource correlation Ids. This can be used to uniquely identify the count of items affected by a specific category and severity as well as count of item affected by an specific issue. + * + * @return the affectedResourceCorrelationIds value + */ + public List affectedResourceCorrelationIds() { + return this.affectedResourceCorrelationIds; + } + + /** + * Set the list of affected resource correlation Ids. This can be used to uniquely identify the count of items affected by a specific category and severity as well as count of item affected by an specific issue. + * + * @param affectedResourceCorrelationIds the affectedResourceCorrelationIds value to set + * @return the HealthErrorSummary object itself. + */ + public HealthErrorSummary withAffectedResourceCorrelationIds(List affectedResourceCorrelationIds) { + this.affectedResourceCorrelationIds = affectedResourceCorrelationIds; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplica2012EventDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplica2012EventDetails.java new file mode 100644 index 0000000000000..3fa28466cb354 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplica2012EventDetails.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Model class for event details of a HyperVReplica E2E event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplica2012") +public class HyperVReplica2012EventDetails extends EventProviderSpecificDetails { + /** + * The container friendly name. + */ + @JsonProperty(value = "containerName") + private String containerName; + + /** + * The fabric friendly name. + */ + @JsonProperty(value = "fabricName") + private String fabricName; + + /** + * The remote container name. + */ + @JsonProperty(value = "remoteContainerName") + private String remoteContainerName; + + /** + * The remote fabric name. + */ + @JsonProperty(value = "remoteFabricName") + private String remoteFabricName; + + /** + * Get the container friendly name. + * + * @return the containerName value + */ + public String containerName() { + return this.containerName; + } + + /** + * Set the container friendly name. + * + * @param containerName the containerName value to set + * @return the HyperVReplica2012EventDetails object itself. + */ + public HyperVReplica2012EventDetails withContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get the fabric friendly name. + * + * @return the fabricName value + */ + public String fabricName() { + return this.fabricName; + } + + /** + * Set the fabric friendly name. + * + * @param fabricName the fabricName value to set + * @return the HyperVReplica2012EventDetails object itself. + */ + public HyperVReplica2012EventDetails withFabricName(String fabricName) { + this.fabricName = fabricName; + return this; + } + + /** + * Get the remote container name. + * + * @return the remoteContainerName value + */ + public String remoteContainerName() { + return this.remoteContainerName; + } + + /** + * Set the remote container name. + * + * @param remoteContainerName the remoteContainerName value to set + * @return the HyperVReplica2012EventDetails object itself. + */ + public HyperVReplica2012EventDetails withRemoteContainerName(String remoteContainerName) { + this.remoteContainerName = remoteContainerName; + return this; + } + + /** + * Get the remote fabric name. + * + * @return the remoteFabricName value + */ + public String remoteFabricName() { + return this.remoteFabricName; + } + + /** + * Set the remote fabric name. + * + * @param remoteFabricName the remoteFabricName value to set + * @return the HyperVReplica2012EventDetails object itself. + */ + public HyperVReplica2012EventDetails withRemoteFabricName(String remoteFabricName) { + this.remoteFabricName = remoteFabricName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplica2012R2EventDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplica2012R2EventDetails.java new file mode 100644 index 0000000000000..41307bcc99f14 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplica2012R2EventDetails.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Model class for event details of a HyperVReplica blue E2E event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplica2012R2") +public class HyperVReplica2012R2EventDetails extends EventProviderSpecificDetails { + /** + * The container friendly name. + */ + @JsonProperty(value = "containerName") + private String containerName; + + /** + * The fabric friendly name. + */ + @JsonProperty(value = "fabricName") + private String fabricName; + + /** + * The remote container name. + */ + @JsonProperty(value = "remoteContainerName") + private String remoteContainerName; + + /** + * The remote fabric name. + */ + @JsonProperty(value = "remoteFabricName") + private String remoteFabricName; + + /** + * Get the container friendly name. + * + * @return the containerName value + */ + public String containerName() { + return this.containerName; + } + + /** + * Set the container friendly name. + * + * @param containerName the containerName value to set + * @return the HyperVReplica2012R2EventDetails object itself. + */ + public HyperVReplica2012R2EventDetails withContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get the fabric friendly name. + * + * @return the fabricName value + */ + public String fabricName() { + return this.fabricName; + } + + /** + * Set the fabric friendly name. + * + * @param fabricName the fabricName value to set + * @return the HyperVReplica2012R2EventDetails object itself. + */ + public HyperVReplica2012R2EventDetails withFabricName(String fabricName) { + this.fabricName = fabricName; + return this; + } + + /** + * Get the remote container name. + * + * @return the remoteContainerName value + */ + public String remoteContainerName() { + return this.remoteContainerName; + } + + /** + * Set the remote container name. + * + * @param remoteContainerName the remoteContainerName value to set + * @return the HyperVReplica2012R2EventDetails object itself. + */ + public HyperVReplica2012R2EventDetails withRemoteContainerName(String remoteContainerName) { + this.remoteContainerName = remoteContainerName; + return this; + } + + /** + * Get the remote fabric name. + * + * @return the remoteFabricName value + */ + public String remoteFabricName() { + return this.remoteFabricName; + } + + /** + * Set the remote fabric name. + * + * @param remoteFabricName the remoteFabricName value to set + * @return the HyperVReplica2012R2EventDetails object itself. + */ + public HyperVReplica2012R2EventDetails withRemoteFabricName(String remoteFabricName) { + this.remoteFabricName = remoteFabricName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureApplyRecoveryPointInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureApplyRecoveryPointInput.java new file mode 100644 index 0000000000000..74d8499121a21 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureApplyRecoveryPointInput.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ApplyRecoveryPoint input specific to HyperVReplicaAzure provider. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplicaAzure") +public class HyperVReplicaAzureApplyRecoveryPointInput extends ApplyRecoveryPointProviderSpecificInput { + /** + * The vault location where the recovery Vm resides. + */ + @JsonProperty(value = "vaultLocation") + private String vaultLocation; + + /** + * The primary kek certificate pfx. + */ + @JsonProperty(value = "primaryKekCertificatePfx") + private String primaryKekCertificatePfx; + + /** + * The secondary kek certificate pfx. + */ + @JsonProperty(value = "secondaryKekCertificatePfx") + private String secondaryKekCertificatePfx; + + /** + * Get the vault location where the recovery Vm resides. + * + * @return the vaultLocation value + */ + public String vaultLocation() { + return this.vaultLocation; + } + + /** + * Set the vault location where the recovery Vm resides. + * + * @param vaultLocation the vaultLocation value to set + * @return the HyperVReplicaAzureApplyRecoveryPointInput object itself. + */ + public HyperVReplicaAzureApplyRecoveryPointInput withVaultLocation(String vaultLocation) { + this.vaultLocation = vaultLocation; + return this; + } + + /** + * Get the primary kek certificate pfx. + * + * @return the primaryKekCertificatePfx value + */ + public String primaryKekCertificatePfx() { + return this.primaryKekCertificatePfx; + } + + /** + * Set the primary kek certificate pfx. + * + * @param primaryKekCertificatePfx the primaryKekCertificatePfx value to set + * @return the HyperVReplicaAzureApplyRecoveryPointInput object itself. + */ + public HyperVReplicaAzureApplyRecoveryPointInput withPrimaryKekCertificatePfx(String primaryKekCertificatePfx) { + this.primaryKekCertificatePfx = primaryKekCertificatePfx; + return this; + } + + /** + * Get the secondary kek certificate pfx. + * + * @return the secondaryKekCertificatePfx value + */ + public String secondaryKekCertificatePfx() { + return this.secondaryKekCertificatePfx; + } + + /** + * Set the secondary kek certificate pfx. + * + * @param secondaryKekCertificatePfx the secondaryKekCertificatePfx value to set + * @return the HyperVReplicaAzureApplyRecoveryPointInput object itself. + */ + public HyperVReplicaAzureApplyRecoveryPointInput withSecondaryKekCertificatePfx(String secondaryKekCertificatePfx) { + this.secondaryKekCertificatePfx = secondaryKekCertificatePfx; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureEnableProtectionInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureEnableProtectionInput.java new file mode 100644 index 0000000000000..316a93269c9a0 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureEnableProtectionInput.java @@ -0,0 +1,389 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Azure specific enable protection input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplicaAzure") +public class HyperVReplicaAzureEnableProtectionInput extends EnableProtectionProviderSpecificInput { + /** + * The Hyper-V host Vm Id. + */ + @JsonProperty(value = "hvHostVmId") + private String hvHostVmId; + + /** + * The Vm Name. + */ + @JsonProperty(value = "vmName") + private String vmName; + + /** + * The OS type associated with vm. + */ + @JsonProperty(value = "osType") + private String osType; + + /** + * The OS disk VHD id associated with vm. + */ + @JsonProperty(value = "vhdId") + private String vhdId; + + /** + * The storage account name. + */ + @JsonProperty(value = "targetStorageAccountId") + private String targetStorageAccountId; + + /** + * The selected target Azure network Id. + */ + @JsonProperty(value = "targetAzureNetworkId") + private String targetAzureNetworkId; + + /** + * The selected target Azure subnet Id. + */ + @JsonProperty(value = "targetAzureSubnetId") + private String targetAzureSubnetId; + + /** + * The selected option to enable RDP\SSH on target vm after failover. + * String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + */ + @JsonProperty(value = "enableRDPOnTargetOption") + private String enableRDPOnTargetOption; + + /** + * The target azure Vm Name. + */ + @JsonProperty(value = "targetAzureVmName") + private String targetAzureVmName; + + /** + * The storage account to be used for logging during replication. + */ + @JsonProperty(value = "logStorageAccountId") + private String logStorageAccountId; + + /** + * The list of VHD IDs of disks to be protected. + */ + @JsonProperty(value = "disksToInclude") + private List disksToInclude; + + /** + * The Id of the target resource group (for classic deployment) in which + * the failover VM is to be created. + */ + @JsonProperty(value = "targetAzureV1ResourceGroupId") + private String targetAzureV1ResourceGroupId; + + /** + * The Id of the target resource group (for resource manager deployment) in + * which the failover VM is to be created. + */ + @JsonProperty(value = "targetAzureV2ResourceGroupId") + private String targetAzureV2ResourceGroupId; + + /** + * A value indicating whether managed disks should be used during failover. + */ + @JsonProperty(value = "useManagedDisks") + private String useManagedDisks; + + /** + * Get the Hyper-V host Vm Id. + * + * @return the hvHostVmId value + */ + public String hvHostVmId() { + return this.hvHostVmId; + } + + /** + * Set the Hyper-V host Vm Id. + * + * @param hvHostVmId the hvHostVmId value to set + * @return the HyperVReplicaAzureEnableProtectionInput object itself. + */ + public HyperVReplicaAzureEnableProtectionInput withHvHostVmId(String hvHostVmId) { + this.hvHostVmId = hvHostVmId; + return this; + } + + /** + * Get the Vm Name. + * + * @return the vmName value + */ + public String vmName() { + return this.vmName; + } + + /** + * Set the Vm Name. + * + * @param vmName the vmName value to set + * @return the HyperVReplicaAzureEnableProtectionInput object itself. + */ + public HyperVReplicaAzureEnableProtectionInput withVmName(String vmName) { + this.vmName = vmName; + return this; + } + + /** + * Get the OS type associated with vm. + * + * @return the osType value + */ + public String osType() { + return this.osType; + } + + /** + * Set the OS type associated with vm. + * + * @param osType the osType value to set + * @return the HyperVReplicaAzureEnableProtectionInput object itself. + */ + public HyperVReplicaAzureEnableProtectionInput withOsType(String osType) { + this.osType = osType; + return this; + } + + /** + * Get the OS disk VHD id associated with vm. + * + * @return the vhdId value + */ + public String vhdId() { + return this.vhdId; + } + + /** + * Set the OS disk VHD id associated with vm. + * + * @param vhdId the vhdId value to set + * @return the HyperVReplicaAzureEnableProtectionInput object itself. + */ + public HyperVReplicaAzureEnableProtectionInput withVhdId(String vhdId) { + this.vhdId = vhdId; + return this; + } + + /** + * Get the storage account name. + * + * @return the targetStorageAccountId value + */ + public String targetStorageAccountId() { + return this.targetStorageAccountId; + } + + /** + * Set the storage account name. + * + * @param targetStorageAccountId the targetStorageAccountId value to set + * @return the HyperVReplicaAzureEnableProtectionInput object itself. + */ + public HyperVReplicaAzureEnableProtectionInput withTargetStorageAccountId(String targetStorageAccountId) { + this.targetStorageAccountId = targetStorageAccountId; + return this; + } + + /** + * Get the selected target Azure network Id. + * + * @return the targetAzureNetworkId value + */ + public String targetAzureNetworkId() { + return this.targetAzureNetworkId; + } + + /** + * Set the selected target Azure network Id. + * + * @param targetAzureNetworkId the targetAzureNetworkId value to set + * @return the HyperVReplicaAzureEnableProtectionInput object itself. + */ + public HyperVReplicaAzureEnableProtectionInput withTargetAzureNetworkId(String targetAzureNetworkId) { + this.targetAzureNetworkId = targetAzureNetworkId; + return this; + } + + /** + * Get the selected target Azure subnet Id. + * + * @return the targetAzureSubnetId value + */ + public String targetAzureSubnetId() { + return this.targetAzureSubnetId; + } + + /** + * Set the selected target Azure subnet Id. + * + * @param targetAzureSubnetId the targetAzureSubnetId value to set + * @return the HyperVReplicaAzureEnableProtectionInput object itself. + */ + public HyperVReplicaAzureEnableProtectionInput withTargetAzureSubnetId(String targetAzureSubnetId) { + this.targetAzureSubnetId = targetAzureSubnetId; + return this; + } + + /** + * Get the selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + * + * @return the enableRDPOnTargetOption value + */ + public String enableRDPOnTargetOption() { + return this.enableRDPOnTargetOption; + } + + /** + * Set the selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + * + * @param enableRDPOnTargetOption the enableRDPOnTargetOption value to set + * @return the HyperVReplicaAzureEnableProtectionInput object itself. + */ + public HyperVReplicaAzureEnableProtectionInput withEnableRDPOnTargetOption(String enableRDPOnTargetOption) { + this.enableRDPOnTargetOption = enableRDPOnTargetOption; + return this; + } + + /** + * Get the target azure Vm Name. + * + * @return the targetAzureVmName value + */ + public String targetAzureVmName() { + return this.targetAzureVmName; + } + + /** + * Set the target azure Vm Name. + * + * @param targetAzureVmName the targetAzureVmName value to set + * @return the HyperVReplicaAzureEnableProtectionInput object itself. + */ + public HyperVReplicaAzureEnableProtectionInput withTargetAzureVmName(String targetAzureVmName) { + this.targetAzureVmName = targetAzureVmName; + return this; + } + + /** + * Get the storage account to be used for logging during replication. + * + * @return the logStorageAccountId value + */ + public String logStorageAccountId() { + return this.logStorageAccountId; + } + + /** + * Set the storage account to be used for logging during replication. + * + * @param logStorageAccountId the logStorageAccountId value to set + * @return the HyperVReplicaAzureEnableProtectionInput object itself. + */ + public HyperVReplicaAzureEnableProtectionInput withLogStorageAccountId(String logStorageAccountId) { + this.logStorageAccountId = logStorageAccountId; + return this; + } + + /** + * Get the list of VHD IDs of disks to be protected. + * + * @return the disksToInclude value + */ + public List disksToInclude() { + return this.disksToInclude; + } + + /** + * Set the list of VHD IDs of disks to be protected. + * + * @param disksToInclude the disksToInclude value to set + * @return the HyperVReplicaAzureEnableProtectionInput object itself. + */ + public HyperVReplicaAzureEnableProtectionInput withDisksToInclude(List disksToInclude) { + this.disksToInclude = disksToInclude; + return this; + } + + /** + * Get the Id of the target resource group (for classic deployment) in which the failover VM is to be created. + * + * @return the targetAzureV1ResourceGroupId value + */ + public String targetAzureV1ResourceGroupId() { + return this.targetAzureV1ResourceGroupId; + } + + /** + * Set the Id of the target resource group (for classic deployment) in which the failover VM is to be created. + * + * @param targetAzureV1ResourceGroupId the targetAzureV1ResourceGroupId value to set + * @return the HyperVReplicaAzureEnableProtectionInput object itself. + */ + public HyperVReplicaAzureEnableProtectionInput withTargetAzureV1ResourceGroupId(String targetAzureV1ResourceGroupId) { + this.targetAzureV1ResourceGroupId = targetAzureV1ResourceGroupId; + return this; + } + + /** + * Get the Id of the target resource group (for resource manager deployment) in which the failover VM is to be created. + * + * @return the targetAzureV2ResourceGroupId value + */ + public String targetAzureV2ResourceGroupId() { + return this.targetAzureV2ResourceGroupId; + } + + /** + * Set the Id of the target resource group (for resource manager deployment) in which the failover VM is to be created. + * + * @param targetAzureV2ResourceGroupId the targetAzureV2ResourceGroupId value to set + * @return the HyperVReplicaAzureEnableProtectionInput object itself. + */ + public HyperVReplicaAzureEnableProtectionInput withTargetAzureV2ResourceGroupId(String targetAzureV2ResourceGroupId) { + this.targetAzureV2ResourceGroupId = targetAzureV2ResourceGroupId; + return this; + } + + /** + * Get a value indicating whether managed disks should be used during failover. + * + * @return the useManagedDisks value + */ + public String useManagedDisks() { + return this.useManagedDisks; + } + + /** + * Set a value indicating whether managed disks should be used during failover. + * + * @param useManagedDisks the useManagedDisks value to set + * @return the HyperVReplicaAzureEnableProtectionInput object itself. + */ + public HyperVReplicaAzureEnableProtectionInput withUseManagedDisks(String useManagedDisks) { + this.useManagedDisks = useManagedDisks; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureEventDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureEventDetails.java new file mode 100644 index 0000000000000..773a18d4f3cd5 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureEventDetails.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Model class for event details of a HyperVReplica E2A event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplicaAzure") +public class HyperVReplicaAzureEventDetails extends EventProviderSpecificDetails { + /** + * The container friendly name. + */ + @JsonProperty(value = "containerName") + private String containerName; + + /** + * The fabric friendly name. + */ + @JsonProperty(value = "fabricName") + private String fabricName; + + /** + * The remote container name. + */ + @JsonProperty(value = "remoteContainerName") + private String remoteContainerName; + + /** + * Get the container friendly name. + * + * @return the containerName value + */ + public String containerName() { + return this.containerName; + } + + /** + * Set the container friendly name. + * + * @param containerName the containerName value to set + * @return the HyperVReplicaAzureEventDetails object itself. + */ + public HyperVReplicaAzureEventDetails withContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get the fabric friendly name. + * + * @return the fabricName value + */ + public String fabricName() { + return this.fabricName; + } + + /** + * Set the fabric friendly name. + * + * @param fabricName the fabricName value to set + * @return the HyperVReplicaAzureEventDetails object itself. + */ + public HyperVReplicaAzureEventDetails withFabricName(String fabricName) { + this.fabricName = fabricName; + return this; + } + + /** + * Get the remote container name. + * + * @return the remoteContainerName value + */ + public String remoteContainerName() { + return this.remoteContainerName; + } + + /** + * Set the remote container name. + * + * @param remoteContainerName the remoteContainerName value to set + * @return the HyperVReplicaAzureEventDetails object itself. + */ + public HyperVReplicaAzureEventDetails withRemoteContainerName(String remoteContainerName) { + this.remoteContainerName = remoteContainerName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureFailbackProviderInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureFailbackProviderInput.java new file mode 100644 index 0000000000000..a232fcafeecdc --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureFailbackProviderInput.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * HvrA provider specific input for failback. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplicaAzureFailback") +public class HyperVReplicaAzureFailbackProviderInput extends ProviderSpecificFailoverInput { + /** + * Data sync option. + */ + @JsonProperty(value = "dataSyncOption") + private String dataSyncOption; + + /** + * ALR options to create alternate recovery. + */ + @JsonProperty(value = "recoveryVmCreationOption") + private String recoveryVmCreationOption; + + /** + * Provider ID for alternate location. + */ + @JsonProperty(value = "providerIdForAlternateRecovery") + private String providerIdForAlternateRecovery; + + /** + * Get data sync option. + * + * @return the dataSyncOption value + */ + public String dataSyncOption() { + return this.dataSyncOption; + } + + /** + * Set data sync option. + * + * @param dataSyncOption the dataSyncOption value to set + * @return the HyperVReplicaAzureFailbackProviderInput object itself. + */ + public HyperVReplicaAzureFailbackProviderInput withDataSyncOption(String dataSyncOption) { + this.dataSyncOption = dataSyncOption; + return this; + } + + /** + * Get aLR options to create alternate recovery. + * + * @return the recoveryVmCreationOption value + */ + public String recoveryVmCreationOption() { + return this.recoveryVmCreationOption; + } + + /** + * Set aLR options to create alternate recovery. + * + * @param recoveryVmCreationOption the recoveryVmCreationOption value to set + * @return the HyperVReplicaAzureFailbackProviderInput object itself. + */ + public HyperVReplicaAzureFailbackProviderInput withRecoveryVmCreationOption(String recoveryVmCreationOption) { + this.recoveryVmCreationOption = recoveryVmCreationOption; + return this; + } + + /** + * Get provider ID for alternate location. + * + * @return the providerIdForAlternateRecovery value + */ + public String providerIdForAlternateRecovery() { + return this.providerIdForAlternateRecovery; + } + + /** + * Set provider ID for alternate location. + * + * @param providerIdForAlternateRecovery the providerIdForAlternateRecovery value to set + * @return the HyperVReplicaAzureFailbackProviderInput object itself. + */ + public HyperVReplicaAzureFailbackProviderInput withProviderIdForAlternateRecovery(String providerIdForAlternateRecovery) { + this.providerIdForAlternateRecovery = providerIdForAlternateRecovery; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureFailoverProviderInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureFailoverProviderInput.java new file mode 100644 index 0000000000000..e51f3601b1d9b --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureFailoverProviderInput.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * HvrA provider specific input for failover. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplicaAzure") +public class HyperVReplicaAzureFailoverProviderInput extends ProviderSpecificFailoverInput { + /** + * Location of the vault. + */ + @JsonProperty(value = "vaultLocation") + private String vaultLocation; + + /** + * Primary kek certificate pfx. + */ + @JsonProperty(value = "primaryKekCertificatePfx") + private String primaryKekCertificatePfx; + + /** + * Secondary kek certificate pfx. + */ + @JsonProperty(value = "secondaryKekCertificatePfx") + private String secondaryKekCertificatePfx; + + /** + * The recovery point id to be passed to failover to a particular recovery + * point. In case of latest recovery point, null should be passed. + */ + @JsonProperty(value = "recoveryPointId") + private String recoveryPointId; + + /** + * Get location of the vault. + * + * @return the vaultLocation value + */ + public String vaultLocation() { + return this.vaultLocation; + } + + /** + * Set location of the vault. + * + * @param vaultLocation the vaultLocation value to set + * @return the HyperVReplicaAzureFailoverProviderInput object itself. + */ + public HyperVReplicaAzureFailoverProviderInput withVaultLocation(String vaultLocation) { + this.vaultLocation = vaultLocation; + return this; + } + + /** + * Get primary kek certificate pfx. + * + * @return the primaryKekCertificatePfx value + */ + public String primaryKekCertificatePfx() { + return this.primaryKekCertificatePfx; + } + + /** + * Set primary kek certificate pfx. + * + * @param primaryKekCertificatePfx the primaryKekCertificatePfx value to set + * @return the HyperVReplicaAzureFailoverProviderInput object itself. + */ + public HyperVReplicaAzureFailoverProviderInput withPrimaryKekCertificatePfx(String primaryKekCertificatePfx) { + this.primaryKekCertificatePfx = primaryKekCertificatePfx; + return this; + } + + /** + * Get secondary kek certificate pfx. + * + * @return the secondaryKekCertificatePfx value + */ + public String secondaryKekCertificatePfx() { + return this.secondaryKekCertificatePfx; + } + + /** + * Set secondary kek certificate pfx. + * + * @param secondaryKekCertificatePfx the secondaryKekCertificatePfx value to set + * @return the HyperVReplicaAzureFailoverProviderInput object itself. + */ + public HyperVReplicaAzureFailoverProviderInput withSecondaryKekCertificatePfx(String secondaryKekCertificatePfx) { + this.secondaryKekCertificatePfx = secondaryKekCertificatePfx; + return this; + } + + /** + * Get the recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. + * + * @return the recoveryPointId value + */ + public String recoveryPointId() { + return this.recoveryPointId; + } + + /** + * Set the recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. + * + * @param recoveryPointId the recoveryPointId value to set + * @return the HyperVReplicaAzureFailoverProviderInput object itself. + */ + public HyperVReplicaAzureFailoverProviderInput withRecoveryPointId(String recoveryPointId) { + this.recoveryPointId = recoveryPointId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzurePolicyDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzurePolicyDetails.java new file mode 100644 index 0000000000000..aef41994634c6 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzurePolicyDetails.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Hyper-V Replica Azure specific protection profile details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplicaAzure") +public class HyperVReplicaAzurePolicyDetails extends PolicyProviderSpecificDetails { + /** + * The duration (in hours) to which point the recovery history needs to be + * maintained. + */ + @JsonProperty(value = "recoveryPointHistoryDurationInHours") + private Integer recoveryPointHistoryDurationInHours; + + /** + * The interval (in hours) at which Hyper-V Replica should create an + * application consistent snapshot within the VM. + */ + @JsonProperty(value = "applicationConsistentSnapshotFrequencyInHours") + private Integer applicationConsistentSnapshotFrequencyInHours; + + /** + * The replication interval. + */ + @JsonProperty(value = "replicationInterval") + private Integer replicationInterval; + + /** + * The scheduled start time for the initial replication. If this parameter + * is Null, the initial replication starts immediately. + */ + @JsonProperty(value = "onlineReplicationStartTime") + private String onlineReplicationStartTime; + + /** + * A value indicating whether encryption is enabled for virtual machines in + * this cloud. + */ + @JsonProperty(value = "encryption") + private String encryption; + + /** + * The active storage account Id. + */ + @JsonProperty(value = "activeStorageAccountId") + private String activeStorageAccountId; + + /** + * Get the duration (in hours) to which point the recovery history needs to be maintained. + * + * @return the recoveryPointHistoryDurationInHours value + */ + public Integer recoveryPointHistoryDurationInHours() { + return this.recoveryPointHistoryDurationInHours; + } + + /** + * Set the duration (in hours) to which point the recovery history needs to be maintained. + * + * @param recoveryPointHistoryDurationInHours the recoveryPointHistoryDurationInHours value to set + * @return the HyperVReplicaAzurePolicyDetails object itself. + */ + public HyperVReplicaAzurePolicyDetails withRecoveryPointHistoryDurationInHours(Integer recoveryPointHistoryDurationInHours) { + this.recoveryPointHistoryDurationInHours = recoveryPointHistoryDurationInHours; + return this; + } + + /** + * Get the interval (in hours) at which Hyper-V Replica should create an application consistent snapshot within the VM. + * + * @return the applicationConsistentSnapshotFrequencyInHours value + */ + public Integer applicationConsistentSnapshotFrequencyInHours() { + return this.applicationConsistentSnapshotFrequencyInHours; + } + + /** + * Set the interval (in hours) at which Hyper-V Replica should create an application consistent snapshot within the VM. + * + * @param applicationConsistentSnapshotFrequencyInHours the applicationConsistentSnapshotFrequencyInHours value to set + * @return the HyperVReplicaAzurePolicyDetails object itself. + */ + public HyperVReplicaAzurePolicyDetails withApplicationConsistentSnapshotFrequencyInHours(Integer applicationConsistentSnapshotFrequencyInHours) { + this.applicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + return this; + } + + /** + * Get the replication interval. + * + * @return the replicationInterval value + */ + public Integer replicationInterval() { + return this.replicationInterval; + } + + /** + * Set the replication interval. + * + * @param replicationInterval the replicationInterval value to set + * @return the HyperVReplicaAzurePolicyDetails object itself. + */ + public HyperVReplicaAzurePolicyDetails withReplicationInterval(Integer replicationInterval) { + this.replicationInterval = replicationInterval; + return this; + } + + /** + * Get the scheduled start time for the initial replication. If this parameter is Null, the initial replication starts immediately. + * + * @return the onlineReplicationStartTime value + */ + public String onlineReplicationStartTime() { + return this.onlineReplicationStartTime; + } + + /** + * Set the scheduled start time for the initial replication. If this parameter is Null, the initial replication starts immediately. + * + * @param onlineReplicationStartTime the onlineReplicationStartTime value to set + * @return the HyperVReplicaAzurePolicyDetails object itself. + */ + public HyperVReplicaAzurePolicyDetails withOnlineReplicationStartTime(String onlineReplicationStartTime) { + this.onlineReplicationStartTime = onlineReplicationStartTime; + return this; + } + + /** + * Get a value indicating whether encryption is enabled for virtual machines in this cloud. + * + * @return the encryption value + */ + public String encryption() { + return this.encryption; + } + + /** + * Set a value indicating whether encryption is enabled for virtual machines in this cloud. + * + * @param encryption the encryption value to set + * @return the HyperVReplicaAzurePolicyDetails object itself. + */ + public HyperVReplicaAzurePolicyDetails withEncryption(String encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the active storage account Id. + * + * @return the activeStorageAccountId value + */ + public String activeStorageAccountId() { + return this.activeStorageAccountId; + } + + /** + * Set the active storage account Id. + * + * @param activeStorageAccountId the activeStorageAccountId value to set + * @return the HyperVReplicaAzurePolicyDetails object itself. + */ + public HyperVReplicaAzurePolicyDetails withActiveStorageAccountId(String activeStorageAccountId) { + this.activeStorageAccountId = activeStorageAccountId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzurePolicyInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzurePolicyInput.java new file mode 100644 index 0000000000000..889f1bbe705d1 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzurePolicyInput.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Hyper-V Replica Azure specific input for creating a protection profile. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplicaAzure") +public class HyperVReplicaAzurePolicyInput extends PolicyProviderSpecificInput { + /** + * The duration (in hours) to which point the recovery history needs to be + * maintained. + */ + @JsonProperty(value = "recoveryPointHistoryDuration") + private Integer recoveryPointHistoryDuration; + + /** + * The interval (in hours) at which Hyper-V Replica should create an + * application consistent snapshot within the VM. + */ + @JsonProperty(value = "applicationConsistentSnapshotFrequencyInHours") + private Integer applicationConsistentSnapshotFrequencyInHours; + + /** + * The replication interval. + */ + @JsonProperty(value = "replicationInterval") + private Integer replicationInterval; + + /** + * The scheduled start time for the initial replication. If this parameter + * is Null, the initial replication starts immediately. + */ + @JsonProperty(value = "onlineReplicationStartTime") + private String onlineReplicationStartTime; + + /** + * A value indicating whether encryption needs to be enabled for Vms in + * this cloud. + */ + @JsonProperty(value = "encryption") + private String encryption; + + /** + * The list of storage accounts to which the VMs in the primary cloud can + * replicate to. + */ + @JsonProperty(value = "storageAccounts") + private List storageAccounts; + + /** + * Get the duration (in hours) to which point the recovery history needs to be maintained. + * + * @return the recoveryPointHistoryDuration value + */ + public Integer recoveryPointHistoryDuration() { + return this.recoveryPointHistoryDuration; + } + + /** + * Set the duration (in hours) to which point the recovery history needs to be maintained. + * + * @param recoveryPointHistoryDuration the recoveryPointHistoryDuration value to set + * @return the HyperVReplicaAzurePolicyInput object itself. + */ + public HyperVReplicaAzurePolicyInput withRecoveryPointHistoryDuration(Integer recoveryPointHistoryDuration) { + this.recoveryPointHistoryDuration = recoveryPointHistoryDuration; + return this; + } + + /** + * Get the interval (in hours) at which Hyper-V Replica should create an application consistent snapshot within the VM. + * + * @return the applicationConsistentSnapshotFrequencyInHours value + */ + public Integer applicationConsistentSnapshotFrequencyInHours() { + return this.applicationConsistentSnapshotFrequencyInHours; + } + + /** + * Set the interval (in hours) at which Hyper-V Replica should create an application consistent snapshot within the VM. + * + * @param applicationConsistentSnapshotFrequencyInHours the applicationConsistentSnapshotFrequencyInHours value to set + * @return the HyperVReplicaAzurePolicyInput object itself. + */ + public HyperVReplicaAzurePolicyInput withApplicationConsistentSnapshotFrequencyInHours(Integer applicationConsistentSnapshotFrequencyInHours) { + this.applicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + return this; + } + + /** + * Get the replication interval. + * + * @return the replicationInterval value + */ + public Integer replicationInterval() { + return this.replicationInterval; + } + + /** + * Set the replication interval. + * + * @param replicationInterval the replicationInterval value to set + * @return the HyperVReplicaAzurePolicyInput object itself. + */ + public HyperVReplicaAzurePolicyInput withReplicationInterval(Integer replicationInterval) { + this.replicationInterval = replicationInterval; + return this; + } + + /** + * Get the scheduled start time for the initial replication. If this parameter is Null, the initial replication starts immediately. + * + * @return the onlineReplicationStartTime value + */ + public String onlineReplicationStartTime() { + return this.onlineReplicationStartTime; + } + + /** + * Set the scheduled start time for the initial replication. If this parameter is Null, the initial replication starts immediately. + * + * @param onlineReplicationStartTime the onlineReplicationStartTime value to set + * @return the HyperVReplicaAzurePolicyInput object itself. + */ + public HyperVReplicaAzurePolicyInput withOnlineReplicationStartTime(String onlineReplicationStartTime) { + this.onlineReplicationStartTime = onlineReplicationStartTime; + return this; + } + + /** + * Get a value indicating whether encryption needs to be enabled for Vms in this cloud. + * + * @return the encryption value + */ + public String encryption() { + return this.encryption; + } + + /** + * Set a value indicating whether encryption needs to be enabled for Vms in this cloud. + * + * @param encryption the encryption value to set + * @return the HyperVReplicaAzurePolicyInput object itself. + */ + public HyperVReplicaAzurePolicyInput withEncryption(String encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the list of storage accounts to which the VMs in the primary cloud can replicate to. + * + * @return the storageAccounts value + */ + public List storageAccounts() { + return this.storageAccounts; + } + + /** + * Set the list of storage accounts to which the VMs in the primary cloud can replicate to. + * + * @param storageAccounts the storageAccounts value to set + * @return the HyperVReplicaAzurePolicyInput object itself. + */ + public HyperVReplicaAzurePolicyInput withStorageAccounts(List storageAccounts) { + this.storageAccounts = storageAccounts; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureReplicationDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureReplicationDetails.java new file mode 100644 index 0000000000000..01121aaf4f4ca --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureReplicationDetails.java @@ -0,0 +1,572 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Hyper V Replica Azure provider specific settings. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplicaAzure") +public class HyperVReplicaAzureReplicationDetails extends ReplicationProviderSpecificSettings { + /** + * Azure VM Disk details. + */ + @JsonProperty(value = "azureVMDiskDetails") + private List azureVMDiskDetails; + + /** + * Recovery Azure given name. + */ + @JsonProperty(value = "recoveryAzureVMName") + private String recoveryAzureVMName; + + /** + * The Recovery Azure VM size. + */ + @JsonProperty(value = "recoveryAzureVMSize") + private String recoveryAzureVMSize; + + /** + * The recovery Azure storage account. + */ + @JsonProperty(value = "recoveryAzureStorageAccount") + private String recoveryAzureStorageAccount; + + /** + * The ARM id of the log storage account used for replication. This will be + * set to null if no log storage account was provided during enable + * protection. + */ + @JsonProperty(value = "recoveryAzureLogStorageAccountId") + private String recoveryAzureLogStorageAccountId; + + /** + * The Last replication time. + */ + @JsonProperty(value = "lastReplicatedTime") + private DateTime lastReplicatedTime; + + /** + * The virtual machine Id. + */ + @JsonProperty(value = "vmId") + private String vmId; + + /** + * The protection state for the vm. + */ + @JsonProperty(value = "vmProtectionState") + private String vmProtectionState; + + /** + * The protection state description for the vm. + */ + @JsonProperty(value = "vmProtectionStateDescription") + private String vmProtectionStateDescription; + + /** + * Initial replication details. + */ + @JsonProperty(value = "initialReplicationDetails") + private InitialReplicationDetails initialReplicationDetails; + + /** + * The PE Network details. + */ + @JsonProperty(value = "vmNics") + private List vmNics; + + /** + * The selected recovery azure network Id. + */ + @JsonProperty(value = "selectedRecoveryAzureNetworkId") + private String selectedRecoveryAzureNetworkId; + + /** + * The encryption info. + */ + @JsonProperty(value = "encryption") + private String encryption; + + /** + * The operating system info. + */ + @JsonProperty(value = "oSDetails") + private OSDetails oSDetails; + + /** + * The RAM size of the VM on the primary side. + */ + @JsonProperty(value = "sourceVmRAMSizeInMB") + private Integer sourceVmRAMSizeInMB; + + /** + * The CPU count of the VM on the primary side. + */ + @JsonProperty(value = "sourceVmCPUCount") + private Integer sourceVmCPUCount; + + /** + * The selected option to enable RDP\SSH on target vm after failover. + * String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + */ + @JsonProperty(value = "enableRDPOnTargetOption") + private String enableRDPOnTargetOption; + + /** + * The target resource group Id. + */ + @JsonProperty(value = "recoveryAzureResourceGroupId") + private String recoveryAzureResourceGroupId; + + /** + * The recovery availability set Id. + */ + @JsonProperty(value = "recoveryAvailabilitySetId") + private String recoveryAvailabilitySetId; + + /** + * A value indicating whether managed disks should be used during failover. + */ + @JsonProperty(value = "useManagedDisks") + private String useManagedDisks; + + /** + * License Type of the VM to be used. + */ + @JsonProperty(value = "licenseType") + private String licenseType; + + /** + * Get azure VM Disk details. + * + * @return the azureVMDiskDetails value + */ + public List azureVMDiskDetails() { + return this.azureVMDiskDetails; + } + + /** + * Set azure VM Disk details. + * + * @param azureVMDiskDetails the azureVMDiskDetails value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withAzureVMDiskDetails(List azureVMDiskDetails) { + this.azureVMDiskDetails = azureVMDiskDetails; + return this; + } + + /** + * Get recovery Azure given name. + * + * @return the recoveryAzureVMName value + */ + public String recoveryAzureVMName() { + return this.recoveryAzureVMName; + } + + /** + * Set recovery Azure given name. + * + * @param recoveryAzureVMName the recoveryAzureVMName value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withRecoveryAzureVMName(String recoveryAzureVMName) { + this.recoveryAzureVMName = recoveryAzureVMName; + return this; + } + + /** + * Get the Recovery Azure VM size. + * + * @return the recoveryAzureVMSize value + */ + public String recoveryAzureVMSize() { + return this.recoveryAzureVMSize; + } + + /** + * Set the Recovery Azure VM size. + * + * @param recoveryAzureVMSize the recoveryAzureVMSize value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withRecoveryAzureVMSize(String recoveryAzureVMSize) { + this.recoveryAzureVMSize = recoveryAzureVMSize; + return this; + } + + /** + * Get the recovery Azure storage account. + * + * @return the recoveryAzureStorageAccount value + */ + public String recoveryAzureStorageAccount() { + return this.recoveryAzureStorageAccount; + } + + /** + * Set the recovery Azure storage account. + * + * @param recoveryAzureStorageAccount the recoveryAzureStorageAccount value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withRecoveryAzureStorageAccount(String recoveryAzureStorageAccount) { + this.recoveryAzureStorageAccount = recoveryAzureStorageAccount; + return this; + } + + /** + * Get the ARM id of the log storage account used for replication. This will be set to null if no log storage account was provided during enable protection. + * + * @return the recoveryAzureLogStorageAccountId value + */ + public String recoveryAzureLogStorageAccountId() { + return this.recoveryAzureLogStorageAccountId; + } + + /** + * Set the ARM id of the log storage account used for replication. This will be set to null if no log storage account was provided during enable protection. + * + * @param recoveryAzureLogStorageAccountId the recoveryAzureLogStorageAccountId value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withRecoveryAzureLogStorageAccountId(String recoveryAzureLogStorageAccountId) { + this.recoveryAzureLogStorageAccountId = recoveryAzureLogStorageAccountId; + return this; + } + + /** + * Get the Last replication time. + * + * @return the lastReplicatedTime value + */ + public DateTime lastReplicatedTime() { + return this.lastReplicatedTime; + } + + /** + * Set the Last replication time. + * + * @param lastReplicatedTime the lastReplicatedTime value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withLastReplicatedTime(DateTime lastReplicatedTime) { + this.lastReplicatedTime = lastReplicatedTime; + return this; + } + + /** + * Get the virtual machine Id. + * + * @return the vmId value + */ + public String vmId() { + return this.vmId; + } + + /** + * Set the virtual machine Id. + * + * @param vmId the vmId value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withVmId(String vmId) { + this.vmId = vmId; + return this; + } + + /** + * Get the protection state for the vm. + * + * @return the vmProtectionState value + */ + public String vmProtectionState() { + return this.vmProtectionState; + } + + /** + * Set the protection state for the vm. + * + * @param vmProtectionState the vmProtectionState value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withVmProtectionState(String vmProtectionState) { + this.vmProtectionState = vmProtectionState; + return this; + } + + /** + * Get the protection state description for the vm. + * + * @return the vmProtectionStateDescription value + */ + public String vmProtectionStateDescription() { + return this.vmProtectionStateDescription; + } + + /** + * Set the protection state description for the vm. + * + * @param vmProtectionStateDescription the vmProtectionStateDescription value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withVmProtectionStateDescription(String vmProtectionStateDescription) { + this.vmProtectionStateDescription = vmProtectionStateDescription; + return this; + } + + /** + * Get initial replication details. + * + * @return the initialReplicationDetails value + */ + public InitialReplicationDetails initialReplicationDetails() { + return this.initialReplicationDetails; + } + + /** + * Set initial replication details. + * + * @param initialReplicationDetails the initialReplicationDetails value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withInitialReplicationDetails(InitialReplicationDetails initialReplicationDetails) { + this.initialReplicationDetails = initialReplicationDetails; + return this; + } + + /** + * Get the PE Network details. + * + * @return the vmNics value + */ + public List vmNics() { + return this.vmNics; + } + + /** + * Set the PE Network details. + * + * @param vmNics the vmNics value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withVmNics(List vmNics) { + this.vmNics = vmNics; + return this; + } + + /** + * Get the selected recovery azure network Id. + * + * @return the selectedRecoveryAzureNetworkId value + */ + public String selectedRecoveryAzureNetworkId() { + return this.selectedRecoveryAzureNetworkId; + } + + /** + * Set the selected recovery azure network Id. + * + * @param selectedRecoveryAzureNetworkId the selectedRecoveryAzureNetworkId value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withSelectedRecoveryAzureNetworkId(String selectedRecoveryAzureNetworkId) { + this.selectedRecoveryAzureNetworkId = selectedRecoveryAzureNetworkId; + return this; + } + + /** + * Get the encryption info. + * + * @return the encryption value + */ + public String encryption() { + return this.encryption; + } + + /** + * Set the encryption info. + * + * @param encryption the encryption value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withEncryption(String encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the operating system info. + * + * @return the oSDetails value + */ + public OSDetails oSDetails() { + return this.oSDetails; + } + + /** + * Set the operating system info. + * + * @param oSDetails the oSDetails value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withOSDetails(OSDetails oSDetails) { + this.oSDetails = oSDetails; + return this; + } + + /** + * Get the RAM size of the VM on the primary side. + * + * @return the sourceVmRAMSizeInMB value + */ + public Integer sourceVmRAMSizeInMB() { + return this.sourceVmRAMSizeInMB; + } + + /** + * Set the RAM size of the VM on the primary side. + * + * @param sourceVmRAMSizeInMB the sourceVmRAMSizeInMB value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withSourceVmRAMSizeInMB(Integer sourceVmRAMSizeInMB) { + this.sourceVmRAMSizeInMB = sourceVmRAMSizeInMB; + return this; + } + + /** + * Get the CPU count of the VM on the primary side. + * + * @return the sourceVmCPUCount value + */ + public Integer sourceVmCPUCount() { + return this.sourceVmCPUCount; + } + + /** + * Set the CPU count of the VM on the primary side. + * + * @param sourceVmCPUCount the sourceVmCPUCount value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withSourceVmCPUCount(Integer sourceVmCPUCount) { + this.sourceVmCPUCount = sourceVmCPUCount; + return this; + } + + /** + * Get the selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + * + * @return the enableRDPOnTargetOption value + */ + public String enableRDPOnTargetOption() { + return this.enableRDPOnTargetOption; + } + + /** + * Set the selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + * + * @param enableRDPOnTargetOption the enableRDPOnTargetOption value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withEnableRDPOnTargetOption(String enableRDPOnTargetOption) { + this.enableRDPOnTargetOption = enableRDPOnTargetOption; + return this; + } + + /** + * Get the target resource group Id. + * + * @return the recoveryAzureResourceGroupId value + */ + public String recoveryAzureResourceGroupId() { + return this.recoveryAzureResourceGroupId; + } + + /** + * Set the target resource group Id. + * + * @param recoveryAzureResourceGroupId the recoveryAzureResourceGroupId value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withRecoveryAzureResourceGroupId(String recoveryAzureResourceGroupId) { + this.recoveryAzureResourceGroupId = recoveryAzureResourceGroupId; + return this; + } + + /** + * Get the recovery availability set Id. + * + * @return the recoveryAvailabilitySetId value + */ + public String recoveryAvailabilitySetId() { + return this.recoveryAvailabilitySetId; + } + + /** + * Set the recovery availability set Id. + * + * @param recoveryAvailabilitySetId the recoveryAvailabilitySetId value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withRecoveryAvailabilitySetId(String recoveryAvailabilitySetId) { + this.recoveryAvailabilitySetId = recoveryAvailabilitySetId; + return this; + } + + /** + * Get a value indicating whether managed disks should be used during failover. + * + * @return the useManagedDisks value + */ + public String useManagedDisks() { + return this.useManagedDisks; + } + + /** + * Set a value indicating whether managed disks should be used during failover. + * + * @param useManagedDisks the useManagedDisks value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withUseManagedDisks(String useManagedDisks) { + this.useManagedDisks = useManagedDisks; + return this; + } + + /** + * Get license Type of the VM to be used. + * + * @return the licenseType value + */ + public String licenseType() { + return this.licenseType; + } + + /** + * Set license Type of the VM to be used. + * + * @param licenseType the licenseType value to set + * @return the HyperVReplicaAzureReplicationDetails object itself. + */ + public HyperVReplicaAzureReplicationDetails withLicenseType(String licenseType) { + this.licenseType = licenseType; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureReprotectInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureReprotectInput.java new file mode 100644 index 0000000000000..a152422d11476 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureReprotectInput.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Azure specific reprotect input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplicaAzure") +public class HyperVReplicaAzureReprotectInput extends ReverseReplicationProviderSpecificInput { + /** + * The Hyper-V host Vm Id. + */ + @JsonProperty(value = "hvHostVmId") + private String hvHostVmId; + + /** + * The Vm Name. + */ + @JsonProperty(value = "vmName") + private String vmName; + + /** + * The OS type associated with vm. + */ + @JsonProperty(value = "osType") + private String osType; + + /** + * The OS disk VHD id associated with vm. + */ + @JsonProperty(value = "vHDId") + private String vHDId; + + /** + * The storage account name. + */ + @JsonProperty(value = "storageAccountId") + private String storageAccountId; + + /** + * The storage account to be used for logging during replication. + */ + @JsonProperty(value = "logStorageAccountId") + private String logStorageAccountId; + + /** + * Get the Hyper-V host Vm Id. + * + * @return the hvHostVmId value + */ + public String hvHostVmId() { + return this.hvHostVmId; + } + + /** + * Set the Hyper-V host Vm Id. + * + * @param hvHostVmId the hvHostVmId value to set + * @return the HyperVReplicaAzureReprotectInput object itself. + */ + public HyperVReplicaAzureReprotectInput withHvHostVmId(String hvHostVmId) { + this.hvHostVmId = hvHostVmId; + return this; + } + + /** + * Get the Vm Name. + * + * @return the vmName value + */ + public String vmName() { + return this.vmName; + } + + /** + * Set the Vm Name. + * + * @param vmName the vmName value to set + * @return the HyperVReplicaAzureReprotectInput object itself. + */ + public HyperVReplicaAzureReprotectInput withVmName(String vmName) { + this.vmName = vmName; + return this; + } + + /** + * Get the OS type associated with vm. + * + * @return the osType value + */ + public String osType() { + return this.osType; + } + + /** + * Set the OS type associated with vm. + * + * @param osType the osType value to set + * @return the HyperVReplicaAzureReprotectInput object itself. + */ + public HyperVReplicaAzureReprotectInput withOsType(String osType) { + this.osType = osType; + return this; + } + + /** + * Get the OS disk VHD id associated with vm. + * + * @return the vHDId value + */ + public String vHDId() { + return this.vHDId; + } + + /** + * Set the OS disk VHD id associated with vm. + * + * @param vHDId the vHDId value to set + * @return the HyperVReplicaAzureReprotectInput object itself. + */ + public HyperVReplicaAzureReprotectInput withVHDId(String vHDId) { + this.vHDId = vHDId; + return this; + } + + /** + * Get the storage account name. + * + * @return the storageAccountId value + */ + public String storageAccountId() { + return this.storageAccountId; + } + + /** + * Set the storage account name. + * + * @param storageAccountId the storageAccountId value to set + * @return the HyperVReplicaAzureReprotectInput object itself. + */ + public HyperVReplicaAzureReprotectInput withStorageAccountId(String storageAccountId) { + this.storageAccountId = storageAccountId; + return this; + } + + /** + * Get the storage account to be used for logging during replication. + * + * @return the logStorageAccountId value + */ + public String logStorageAccountId() { + return this.logStorageAccountId; + } + + /** + * Set the storage account to be used for logging during replication. + * + * @param logStorageAccountId the logStorageAccountId value to set + * @return the HyperVReplicaAzureReprotectInput object itself. + */ + public HyperVReplicaAzureReprotectInput withLogStorageAccountId(String logStorageAccountId) { + this.logStorageAccountId = logStorageAccountId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureRpRecoveryPointType.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureRpRecoveryPointType.java new file mode 100644 index 0000000000000..e3666c529d2cb --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureRpRecoveryPointType.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for HyperVReplicaAzureRpRecoveryPointType. + */ +public enum HyperVReplicaAzureRpRecoveryPointType { + /** Enum value Latest. */ + LATEST("Latest"), + + /** Enum value LatestApplicationConsistent. */ + LATEST_APPLICATION_CONSISTENT("LatestApplicationConsistent"), + + /** Enum value LatestProcessed. */ + LATEST_PROCESSED("LatestProcessed"); + + /** The actual serialized value for a HyperVReplicaAzureRpRecoveryPointType instance. */ + private String value; + + HyperVReplicaAzureRpRecoveryPointType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a HyperVReplicaAzureRpRecoveryPointType instance. + * + * @param value the serialized value to parse. + * @return the parsed HyperVReplicaAzureRpRecoveryPointType object, or null if unable to parse. + */ + @JsonCreator + public static HyperVReplicaAzureRpRecoveryPointType fromString(String value) { + HyperVReplicaAzureRpRecoveryPointType[] items = HyperVReplicaAzureRpRecoveryPointType.values(); + for (HyperVReplicaAzureRpRecoveryPointType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureUpdateReplicationProtectedItemInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureUpdateReplicationProtectedItemInput.java new file mode 100644 index 0000000000000..d39546232f945 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaAzureUpdateReplicationProtectedItemInput.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * HyperV replica Azure input to update replication protected item. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplicaAzure") +public class HyperVReplicaAzureUpdateReplicationProtectedItemInput extends UpdateReplicationProtectedItemProviderInput { + /** + * The recovery Azure resource group Id for classic deployment. + */ + @JsonProperty(value = "recoveryAzureV1ResourceGroupId") + private String recoveryAzureV1ResourceGroupId; + + /** + * The recovery Azure resource group Id for resource manager deployment. + */ + @JsonProperty(value = "recoveryAzureV2ResourceGroupId") + private String recoveryAzureV2ResourceGroupId; + + /** + * A value indicating whether managed disks should be used during failover. + */ + @JsonProperty(value = "useManagedDisks") + private String useManagedDisks; + + /** + * Get the recovery Azure resource group Id for classic deployment. + * + * @return the recoveryAzureV1ResourceGroupId value + */ + public String recoveryAzureV1ResourceGroupId() { + return this.recoveryAzureV1ResourceGroupId; + } + + /** + * Set the recovery Azure resource group Id for classic deployment. + * + * @param recoveryAzureV1ResourceGroupId the recoveryAzureV1ResourceGroupId value to set + * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself. + */ + public HyperVReplicaAzureUpdateReplicationProtectedItemInput withRecoveryAzureV1ResourceGroupId(String recoveryAzureV1ResourceGroupId) { + this.recoveryAzureV1ResourceGroupId = recoveryAzureV1ResourceGroupId; + return this; + } + + /** + * Get the recovery Azure resource group Id for resource manager deployment. + * + * @return the recoveryAzureV2ResourceGroupId value + */ + public String recoveryAzureV2ResourceGroupId() { + return this.recoveryAzureV2ResourceGroupId; + } + + /** + * Set the recovery Azure resource group Id for resource manager deployment. + * + * @param recoveryAzureV2ResourceGroupId the recoveryAzureV2ResourceGroupId value to set + * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself. + */ + public HyperVReplicaAzureUpdateReplicationProtectedItemInput withRecoveryAzureV2ResourceGroupId(String recoveryAzureV2ResourceGroupId) { + this.recoveryAzureV2ResourceGroupId = recoveryAzureV2ResourceGroupId; + return this; + } + + /** + * Get a value indicating whether managed disks should be used during failover. + * + * @return the useManagedDisks value + */ + public String useManagedDisks() { + return this.useManagedDisks; + } + + /** + * Set a value indicating whether managed disks should be used during failover. + * + * @param useManagedDisks the useManagedDisks value to set + * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself. + */ + public HyperVReplicaAzureUpdateReplicationProtectedItemInput withUseManagedDisks(String useManagedDisks) { + this.useManagedDisks = useManagedDisks; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBaseEventDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBaseEventDetails.java new file mode 100644 index 0000000000000..ad95e3a236be1 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBaseEventDetails.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Abstract model class for event details of a HyperVReplica E2E event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplicaBaseEventDetails") +public class HyperVReplicaBaseEventDetails extends EventProviderSpecificDetails { + /** + * The container friendly name. + */ + @JsonProperty(value = "containerName") + private String containerName; + + /** + * The fabric friendly name. + */ + @JsonProperty(value = "fabricName") + private String fabricName; + + /** + * The remote container name. + */ + @JsonProperty(value = "remoteContainerName") + private String remoteContainerName; + + /** + * The remote fabric name. + */ + @JsonProperty(value = "remoteFabricName") + private String remoteFabricName; + + /** + * Get the container friendly name. + * + * @return the containerName value + */ + public String containerName() { + return this.containerName; + } + + /** + * Set the container friendly name. + * + * @param containerName the containerName value to set + * @return the HyperVReplicaBaseEventDetails object itself. + */ + public HyperVReplicaBaseEventDetails withContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get the fabric friendly name. + * + * @return the fabricName value + */ + public String fabricName() { + return this.fabricName; + } + + /** + * Set the fabric friendly name. + * + * @param fabricName the fabricName value to set + * @return the HyperVReplicaBaseEventDetails object itself. + */ + public HyperVReplicaBaseEventDetails withFabricName(String fabricName) { + this.fabricName = fabricName; + return this; + } + + /** + * Get the remote container name. + * + * @return the remoteContainerName value + */ + public String remoteContainerName() { + return this.remoteContainerName; + } + + /** + * Set the remote container name. + * + * @param remoteContainerName the remoteContainerName value to set + * @return the HyperVReplicaBaseEventDetails object itself. + */ + public HyperVReplicaBaseEventDetails withRemoteContainerName(String remoteContainerName) { + this.remoteContainerName = remoteContainerName; + return this; + } + + /** + * Get the remote fabric name. + * + * @return the remoteFabricName value + */ + public String remoteFabricName() { + return this.remoteFabricName; + } + + /** + * Set the remote fabric name. + * + * @param remoteFabricName the remoteFabricName value to set + * @return the HyperVReplicaBaseEventDetails object itself. + */ + public HyperVReplicaBaseEventDetails withRemoteFabricName(String remoteFabricName) { + this.remoteFabricName = remoteFabricName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBasePolicyDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBasePolicyDetails.java new file mode 100644 index 0000000000000..e626ae257f1b5 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBasePolicyDetails.java @@ -0,0 +1,282 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Base class for HyperVReplica policy details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplicaBasePolicyDetails") +public class HyperVReplicaBasePolicyDetails extends PolicyProviderSpecificDetails { + /** + * A value indicating the number of recovery points. + */ + @JsonProperty(value = "recoveryPoints") + private Integer recoveryPoints; + + /** + * A value indicating the application consistent frequency. + */ + @JsonProperty(value = "applicationConsistentSnapshotFrequencyInHours") + private Integer applicationConsistentSnapshotFrequencyInHours; + + /** + * A value indicating whether compression has to be enabled. + */ + @JsonProperty(value = "compression") + private String compression; + + /** + * A value indicating whether IR is online. + */ + @JsonProperty(value = "initialReplicationMethod") + private String initialReplicationMethod; + + /** + * A value indicating the online IR start time. + */ + @JsonProperty(value = "onlineReplicationStartTime") + private String onlineReplicationStartTime; + + /** + * A value indicating the offline IR import path. + */ + @JsonProperty(value = "offlineReplicationImportPath") + private String offlineReplicationImportPath; + + /** + * A value indicating the offline IR export path. + */ + @JsonProperty(value = "offlineReplicationExportPath") + private String offlineReplicationExportPath; + + /** + * A value indicating the recovery HTTPS port. + */ + @JsonProperty(value = "replicationPort") + private Integer replicationPort; + + /** + * A value indicating the authentication type. + */ + @JsonProperty(value = "allowedAuthenticationType") + private Integer allowedAuthenticationType; + + /** + * A value indicating whether the VM has to be auto deleted. Supported + * Values: String.Empty, None, OnRecoveryCloud. + */ + @JsonProperty(value = "replicaDeletionOption") + private String replicaDeletionOption; + + /** + * Get a value indicating the number of recovery points. + * + * @return the recoveryPoints value + */ + public Integer recoveryPoints() { + return this.recoveryPoints; + } + + /** + * Set a value indicating the number of recovery points. + * + * @param recoveryPoints the recoveryPoints value to set + * @return the HyperVReplicaBasePolicyDetails object itself. + */ + public HyperVReplicaBasePolicyDetails withRecoveryPoints(Integer recoveryPoints) { + this.recoveryPoints = recoveryPoints; + return this; + } + + /** + * Get a value indicating the application consistent frequency. + * + * @return the applicationConsistentSnapshotFrequencyInHours value + */ + public Integer applicationConsistentSnapshotFrequencyInHours() { + return this.applicationConsistentSnapshotFrequencyInHours; + } + + /** + * Set a value indicating the application consistent frequency. + * + * @param applicationConsistentSnapshotFrequencyInHours the applicationConsistentSnapshotFrequencyInHours value to set + * @return the HyperVReplicaBasePolicyDetails object itself. + */ + public HyperVReplicaBasePolicyDetails withApplicationConsistentSnapshotFrequencyInHours(Integer applicationConsistentSnapshotFrequencyInHours) { + this.applicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + return this; + } + + /** + * Get a value indicating whether compression has to be enabled. + * + * @return the compression value + */ + public String compression() { + return this.compression; + } + + /** + * Set a value indicating whether compression has to be enabled. + * + * @param compression the compression value to set + * @return the HyperVReplicaBasePolicyDetails object itself. + */ + public HyperVReplicaBasePolicyDetails withCompression(String compression) { + this.compression = compression; + return this; + } + + /** + * Get a value indicating whether IR is online. + * + * @return the initialReplicationMethod value + */ + public String initialReplicationMethod() { + return this.initialReplicationMethod; + } + + /** + * Set a value indicating whether IR is online. + * + * @param initialReplicationMethod the initialReplicationMethod value to set + * @return the HyperVReplicaBasePolicyDetails object itself. + */ + public HyperVReplicaBasePolicyDetails withInitialReplicationMethod(String initialReplicationMethod) { + this.initialReplicationMethod = initialReplicationMethod; + return this; + } + + /** + * Get a value indicating the online IR start time. + * + * @return the onlineReplicationStartTime value + */ + public String onlineReplicationStartTime() { + return this.onlineReplicationStartTime; + } + + /** + * Set a value indicating the online IR start time. + * + * @param onlineReplicationStartTime the onlineReplicationStartTime value to set + * @return the HyperVReplicaBasePolicyDetails object itself. + */ + public HyperVReplicaBasePolicyDetails withOnlineReplicationStartTime(String onlineReplicationStartTime) { + this.onlineReplicationStartTime = onlineReplicationStartTime; + return this; + } + + /** + * Get a value indicating the offline IR import path. + * + * @return the offlineReplicationImportPath value + */ + public String offlineReplicationImportPath() { + return this.offlineReplicationImportPath; + } + + /** + * Set a value indicating the offline IR import path. + * + * @param offlineReplicationImportPath the offlineReplicationImportPath value to set + * @return the HyperVReplicaBasePolicyDetails object itself. + */ + public HyperVReplicaBasePolicyDetails withOfflineReplicationImportPath(String offlineReplicationImportPath) { + this.offlineReplicationImportPath = offlineReplicationImportPath; + return this; + } + + /** + * Get a value indicating the offline IR export path. + * + * @return the offlineReplicationExportPath value + */ + public String offlineReplicationExportPath() { + return this.offlineReplicationExportPath; + } + + /** + * Set a value indicating the offline IR export path. + * + * @param offlineReplicationExportPath the offlineReplicationExportPath value to set + * @return the HyperVReplicaBasePolicyDetails object itself. + */ + public HyperVReplicaBasePolicyDetails withOfflineReplicationExportPath(String offlineReplicationExportPath) { + this.offlineReplicationExportPath = offlineReplicationExportPath; + return this; + } + + /** + * Get a value indicating the recovery HTTPS port. + * + * @return the replicationPort value + */ + public Integer replicationPort() { + return this.replicationPort; + } + + /** + * Set a value indicating the recovery HTTPS port. + * + * @param replicationPort the replicationPort value to set + * @return the HyperVReplicaBasePolicyDetails object itself. + */ + public HyperVReplicaBasePolicyDetails withReplicationPort(Integer replicationPort) { + this.replicationPort = replicationPort; + return this; + } + + /** + * Get a value indicating the authentication type. + * + * @return the allowedAuthenticationType value + */ + public Integer allowedAuthenticationType() { + return this.allowedAuthenticationType; + } + + /** + * Set a value indicating the authentication type. + * + * @param allowedAuthenticationType the allowedAuthenticationType value to set + * @return the HyperVReplicaBasePolicyDetails object itself. + */ + public HyperVReplicaBasePolicyDetails withAllowedAuthenticationType(Integer allowedAuthenticationType) { + this.allowedAuthenticationType = allowedAuthenticationType; + return this; + } + + /** + * Get a value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud. + * + * @return the replicaDeletionOption value + */ + public String replicaDeletionOption() { + return this.replicaDeletionOption; + } + + /** + * Set a value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud. + * + * @param replicaDeletionOption the replicaDeletionOption value to set + * @return the HyperVReplicaBasePolicyDetails object itself. + */ + public HyperVReplicaBasePolicyDetails withReplicaDeletionOption(String replicaDeletionOption) { + this.replicaDeletionOption = replicaDeletionOption; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBaseReplicationDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBaseReplicationDetails.java new file mode 100644 index 0000000000000..741b885992535 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBaseReplicationDetails.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Hyper V replica provider specific settings base class. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplicaBaseReplicationDetails") +public class HyperVReplicaBaseReplicationDetails extends ReplicationProviderSpecificSettings { + /** + * The Last replication time. + */ + @JsonProperty(value = "lastReplicatedTime") + private DateTime lastReplicatedTime; + + /** + * The PE Network details. + */ + @JsonProperty(value = "vmNics") + private List vmNics; + + /** + * The virtual machine Id. + */ + @JsonProperty(value = "vmId") + private String vmId; + + /** + * The protection state for the vm. + */ + @JsonProperty(value = "vmProtectionState") + private String vmProtectionState; + + /** + * The protection state description for the vm. + */ + @JsonProperty(value = "vmProtectionStateDescription") + private String vmProtectionStateDescription; + + /** + * Initial replication details. + */ + @JsonProperty(value = "initialReplicationDetails") + private InitialReplicationDetails initialReplicationDetails; + + /** + * VM disk details. + */ + @JsonProperty(value = "vMDiskDetails") + private List vMDiskDetails; + + /** + * Get the Last replication time. + * + * @return the lastReplicatedTime value + */ + public DateTime lastReplicatedTime() { + return this.lastReplicatedTime; + } + + /** + * Set the Last replication time. + * + * @param lastReplicatedTime the lastReplicatedTime value to set + * @return the HyperVReplicaBaseReplicationDetails object itself. + */ + public HyperVReplicaBaseReplicationDetails withLastReplicatedTime(DateTime lastReplicatedTime) { + this.lastReplicatedTime = lastReplicatedTime; + return this; + } + + /** + * Get the PE Network details. + * + * @return the vmNics value + */ + public List vmNics() { + return this.vmNics; + } + + /** + * Set the PE Network details. + * + * @param vmNics the vmNics value to set + * @return the HyperVReplicaBaseReplicationDetails object itself. + */ + public HyperVReplicaBaseReplicationDetails withVmNics(List vmNics) { + this.vmNics = vmNics; + return this; + } + + /** + * Get the virtual machine Id. + * + * @return the vmId value + */ + public String vmId() { + return this.vmId; + } + + /** + * Set the virtual machine Id. + * + * @param vmId the vmId value to set + * @return the HyperVReplicaBaseReplicationDetails object itself. + */ + public HyperVReplicaBaseReplicationDetails withVmId(String vmId) { + this.vmId = vmId; + return this; + } + + /** + * Get the protection state for the vm. + * + * @return the vmProtectionState value + */ + public String vmProtectionState() { + return this.vmProtectionState; + } + + /** + * Set the protection state for the vm. + * + * @param vmProtectionState the vmProtectionState value to set + * @return the HyperVReplicaBaseReplicationDetails object itself. + */ + public HyperVReplicaBaseReplicationDetails withVmProtectionState(String vmProtectionState) { + this.vmProtectionState = vmProtectionState; + return this; + } + + /** + * Get the protection state description for the vm. + * + * @return the vmProtectionStateDescription value + */ + public String vmProtectionStateDescription() { + return this.vmProtectionStateDescription; + } + + /** + * Set the protection state description for the vm. + * + * @param vmProtectionStateDescription the vmProtectionStateDescription value to set + * @return the HyperVReplicaBaseReplicationDetails object itself. + */ + public HyperVReplicaBaseReplicationDetails withVmProtectionStateDescription(String vmProtectionStateDescription) { + this.vmProtectionStateDescription = vmProtectionStateDescription; + return this; + } + + /** + * Get initial replication details. + * + * @return the initialReplicationDetails value + */ + public InitialReplicationDetails initialReplicationDetails() { + return this.initialReplicationDetails; + } + + /** + * Set initial replication details. + * + * @param initialReplicationDetails the initialReplicationDetails value to set + * @return the HyperVReplicaBaseReplicationDetails object itself. + */ + public HyperVReplicaBaseReplicationDetails withInitialReplicationDetails(InitialReplicationDetails initialReplicationDetails) { + this.initialReplicationDetails = initialReplicationDetails; + return this; + } + + /** + * Get vM disk details. + * + * @return the vMDiskDetails value + */ + public List vMDiskDetails() { + return this.vMDiskDetails; + } + + /** + * Set vM disk details. + * + * @param vMDiskDetails the vMDiskDetails value to set + * @return the HyperVReplicaBaseReplicationDetails object itself. + */ + public HyperVReplicaBaseReplicationDetails withVMDiskDetails(List vMDiskDetails) { + this.vMDiskDetails = vMDiskDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBluePolicyDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBluePolicyDetails.java new file mode 100644 index 0000000000000..e17f3f188a353 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBluePolicyDetails.java @@ -0,0 +1,308 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Hyper-V Replica Blue specific protection profile details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplica2012R2") +public class HyperVReplicaBluePolicyDetails extends PolicyProviderSpecificDetails { + /** + * A value indicating the replication interval. + */ + @JsonProperty(value = "replicationFrequencyInSeconds") + private Integer replicationFrequencyInSeconds; + + /** + * A value indicating the number of recovery points. + */ + @JsonProperty(value = "recoveryPoints") + private Integer recoveryPoints; + + /** + * A value indicating the application consistent frequency. + */ + @JsonProperty(value = "applicationConsistentSnapshotFrequencyInHours") + private Integer applicationConsistentSnapshotFrequencyInHours; + + /** + * A value indicating whether compression has to be enabled. + */ + @JsonProperty(value = "compression") + private String compression; + + /** + * A value indicating whether IR is online. + */ + @JsonProperty(value = "initialReplicationMethod") + private String initialReplicationMethod; + + /** + * A value indicating the online IR start time. + */ + @JsonProperty(value = "onlineReplicationStartTime") + private String onlineReplicationStartTime; + + /** + * A value indicating the offline IR import path. + */ + @JsonProperty(value = "offlineReplicationImportPath") + private String offlineReplicationImportPath; + + /** + * A value indicating the offline IR export path. + */ + @JsonProperty(value = "offlineReplicationExportPath") + private String offlineReplicationExportPath; + + /** + * A value indicating the recovery HTTPS port. + */ + @JsonProperty(value = "replicationPort") + private Integer replicationPort; + + /** + * A value indicating the authentication type. + */ + @JsonProperty(value = "allowedAuthenticationType") + private Integer allowedAuthenticationType; + + /** + * A value indicating whether the VM has to be auto deleted. Supported + * Values: String.Empty, None, OnRecoveryCloud. + */ + @JsonProperty(value = "replicaDeletionOption") + private String replicaDeletionOption; + + /** + * Get a value indicating the replication interval. + * + * @return the replicationFrequencyInSeconds value + */ + public Integer replicationFrequencyInSeconds() { + return this.replicationFrequencyInSeconds; + } + + /** + * Set a value indicating the replication interval. + * + * @param replicationFrequencyInSeconds the replicationFrequencyInSeconds value to set + * @return the HyperVReplicaBluePolicyDetails object itself. + */ + public HyperVReplicaBluePolicyDetails withReplicationFrequencyInSeconds(Integer replicationFrequencyInSeconds) { + this.replicationFrequencyInSeconds = replicationFrequencyInSeconds; + return this; + } + + /** + * Get a value indicating the number of recovery points. + * + * @return the recoveryPoints value + */ + public Integer recoveryPoints() { + return this.recoveryPoints; + } + + /** + * Set a value indicating the number of recovery points. + * + * @param recoveryPoints the recoveryPoints value to set + * @return the HyperVReplicaBluePolicyDetails object itself. + */ + public HyperVReplicaBluePolicyDetails withRecoveryPoints(Integer recoveryPoints) { + this.recoveryPoints = recoveryPoints; + return this; + } + + /** + * Get a value indicating the application consistent frequency. + * + * @return the applicationConsistentSnapshotFrequencyInHours value + */ + public Integer applicationConsistentSnapshotFrequencyInHours() { + return this.applicationConsistentSnapshotFrequencyInHours; + } + + /** + * Set a value indicating the application consistent frequency. + * + * @param applicationConsistentSnapshotFrequencyInHours the applicationConsistentSnapshotFrequencyInHours value to set + * @return the HyperVReplicaBluePolicyDetails object itself. + */ + public HyperVReplicaBluePolicyDetails withApplicationConsistentSnapshotFrequencyInHours(Integer applicationConsistentSnapshotFrequencyInHours) { + this.applicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + return this; + } + + /** + * Get a value indicating whether compression has to be enabled. + * + * @return the compression value + */ + public String compression() { + return this.compression; + } + + /** + * Set a value indicating whether compression has to be enabled. + * + * @param compression the compression value to set + * @return the HyperVReplicaBluePolicyDetails object itself. + */ + public HyperVReplicaBluePolicyDetails withCompression(String compression) { + this.compression = compression; + return this; + } + + /** + * Get a value indicating whether IR is online. + * + * @return the initialReplicationMethod value + */ + public String initialReplicationMethod() { + return this.initialReplicationMethod; + } + + /** + * Set a value indicating whether IR is online. + * + * @param initialReplicationMethod the initialReplicationMethod value to set + * @return the HyperVReplicaBluePolicyDetails object itself. + */ + public HyperVReplicaBluePolicyDetails withInitialReplicationMethod(String initialReplicationMethod) { + this.initialReplicationMethod = initialReplicationMethod; + return this; + } + + /** + * Get a value indicating the online IR start time. + * + * @return the onlineReplicationStartTime value + */ + public String onlineReplicationStartTime() { + return this.onlineReplicationStartTime; + } + + /** + * Set a value indicating the online IR start time. + * + * @param onlineReplicationStartTime the onlineReplicationStartTime value to set + * @return the HyperVReplicaBluePolicyDetails object itself. + */ + public HyperVReplicaBluePolicyDetails withOnlineReplicationStartTime(String onlineReplicationStartTime) { + this.onlineReplicationStartTime = onlineReplicationStartTime; + return this; + } + + /** + * Get a value indicating the offline IR import path. + * + * @return the offlineReplicationImportPath value + */ + public String offlineReplicationImportPath() { + return this.offlineReplicationImportPath; + } + + /** + * Set a value indicating the offline IR import path. + * + * @param offlineReplicationImportPath the offlineReplicationImportPath value to set + * @return the HyperVReplicaBluePolicyDetails object itself. + */ + public HyperVReplicaBluePolicyDetails withOfflineReplicationImportPath(String offlineReplicationImportPath) { + this.offlineReplicationImportPath = offlineReplicationImportPath; + return this; + } + + /** + * Get a value indicating the offline IR export path. + * + * @return the offlineReplicationExportPath value + */ + public String offlineReplicationExportPath() { + return this.offlineReplicationExportPath; + } + + /** + * Set a value indicating the offline IR export path. + * + * @param offlineReplicationExportPath the offlineReplicationExportPath value to set + * @return the HyperVReplicaBluePolicyDetails object itself. + */ + public HyperVReplicaBluePolicyDetails withOfflineReplicationExportPath(String offlineReplicationExportPath) { + this.offlineReplicationExportPath = offlineReplicationExportPath; + return this; + } + + /** + * Get a value indicating the recovery HTTPS port. + * + * @return the replicationPort value + */ + public Integer replicationPort() { + return this.replicationPort; + } + + /** + * Set a value indicating the recovery HTTPS port. + * + * @param replicationPort the replicationPort value to set + * @return the HyperVReplicaBluePolicyDetails object itself. + */ + public HyperVReplicaBluePolicyDetails withReplicationPort(Integer replicationPort) { + this.replicationPort = replicationPort; + return this; + } + + /** + * Get a value indicating the authentication type. + * + * @return the allowedAuthenticationType value + */ + public Integer allowedAuthenticationType() { + return this.allowedAuthenticationType; + } + + /** + * Set a value indicating the authentication type. + * + * @param allowedAuthenticationType the allowedAuthenticationType value to set + * @return the HyperVReplicaBluePolicyDetails object itself. + */ + public HyperVReplicaBluePolicyDetails withAllowedAuthenticationType(Integer allowedAuthenticationType) { + this.allowedAuthenticationType = allowedAuthenticationType; + return this; + } + + /** + * Get a value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud. + * + * @return the replicaDeletionOption value + */ + public String replicaDeletionOption() { + return this.replicaDeletionOption; + } + + /** + * Set a value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud. + * + * @param replicaDeletionOption the replicaDeletionOption value to set + * @return the HyperVReplicaBluePolicyDetails object itself. + */ + public HyperVReplicaBluePolicyDetails withReplicaDeletionOption(String replicaDeletionOption) { + this.replicaDeletionOption = replicaDeletionOption; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBluePolicyInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBluePolicyInput.java new file mode 100644 index 0000000000000..5c41515a89910 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBluePolicyInput.java @@ -0,0 +1,307 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * HyperV Replica Blue policy input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplica2012R2") +public class HyperVReplicaBluePolicyInput extends PolicyProviderSpecificInput { + /** + * A value indicating the replication interval. + */ + @JsonProperty(value = "replicationFrequencyInSeconds") + private Integer replicationFrequencyInSeconds; + + /** + * A value indicating the number of recovery points. + */ + @JsonProperty(value = "recoveryPoints") + private Integer recoveryPoints; + + /** + * A value indicating the application consistent frequency. + */ + @JsonProperty(value = "applicationConsistentSnapshotFrequencyInHours") + private Integer applicationConsistentSnapshotFrequencyInHours; + + /** + * A value indicating whether compression has to be enabled. + */ + @JsonProperty(value = "compression") + private String compression; + + /** + * A value indicating whether IR is online. + */ + @JsonProperty(value = "initialReplicationMethod") + private String initialReplicationMethod; + + /** + * A value indicating the online IR start time. + */ + @JsonProperty(value = "onlineReplicationStartTime") + private String onlineReplicationStartTime; + + /** + * A value indicating the offline IR import path. + */ + @JsonProperty(value = "offlineReplicationImportPath") + private String offlineReplicationImportPath; + + /** + * A value indicating the offline IR export path. + */ + @JsonProperty(value = "offlineReplicationExportPath") + private String offlineReplicationExportPath; + + /** + * A value indicating the recovery HTTPS port. + */ + @JsonProperty(value = "replicationPort") + private Integer replicationPort; + + /** + * A value indicating the authentication type. + */ + @JsonProperty(value = "allowedAuthenticationType") + private Integer allowedAuthenticationType; + + /** + * A value indicating whether the VM has to be auto deleted. + */ + @JsonProperty(value = "replicaDeletion") + private String replicaDeletion; + + /** + * Get a value indicating the replication interval. + * + * @return the replicationFrequencyInSeconds value + */ + public Integer replicationFrequencyInSeconds() { + return this.replicationFrequencyInSeconds; + } + + /** + * Set a value indicating the replication interval. + * + * @param replicationFrequencyInSeconds the replicationFrequencyInSeconds value to set + * @return the HyperVReplicaBluePolicyInput object itself. + */ + public HyperVReplicaBluePolicyInput withReplicationFrequencyInSeconds(Integer replicationFrequencyInSeconds) { + this.replicationFrequencyInSeconds = replicationFrequencyInSeconds; + return this; + } + + /** + * Get a value indicating the number of recovery points. + * + * @return the recoveryPoints value + */ + public Integer recoveryPoints() { + return this.recoveryPoints; + } + + /** + * Set a value indicating the number of recovery points. + * + * @param recoveryPoints the recoveryPoints value to set + * @return the HyperVReplicaBluePolicyInput object itself. + */ + public HyperVReplicaBluePolicyInput withRecoveryPoints(Integer recoveryPoints) { + this.recoveryPoints = recoveryPoints; + return this; + } + + /** + * Get a value indicating the application consistent frequency. + * + * @return the applicationConsistentSnapshotFrequencyInHours value + */ + public Integer applicationConsistentSnapshotFrequencyInHours() { + return this.applicationConsistentSnapshotFrequencyInHours; + } + + /** + * Set a value indicating the application consistent frequency. + * + * @param applicationConsistentSnapshotFrequencyInHours the applicationConsistentSnapshotFrequencyInHours value to set + * @return the HyperVReplicaBluePolicyInput object itself. + */ + public HyperVReplicaBluePolicyInput withApplicationConsistentSnapshotFrequencyInHours(Integer applicationConsistentSnapshotFrequencyInHours) { + this.applicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + return this; + } + + /** + * Get a value indicating whether compression has to be enabled. + * + * @return the compression value + */ + public String compression() { + return this.compression; + } + + /** + * Set a value indicating whether compression has to be enabled. + * + * @param compression the compression value to set + * @return the HyperVReplicaBluePolicyInput object itself. + */ + public HyperVReplicaBluePolicyInput withCompression(String compression) { + this.compression = compression; + return this; + } + + /** + * Get a value indicating whether IR is online. + * + * @return the initialReplicationMethod value + */ + public String initialReplicationMethod() { + return this.initialReplicationMethod; + } + + /** + * Set a value indicating whether IR is online. + * + * @param initialReplicationMethod the initialReplicationMethod value to set + * @return the HyperVReplicaBluePolicyInput object itself. + */ + public HyperVReplicaBluePolicyInput withInitialReplicationMethod(String initialReplicationMethod) { + this.initialReplicationMethod = initialReplicationMethod; + return this; + } + + /** + * Get a value indicating the online IR start time. + * + * @return the onlineReplicationStartTime value + */ + public String onlineReplicationStartTime() { + return this.onlineReplicationStartTime; + } + + /** + * Set a value indicating the online IR start time. + * + * @param onlineReplicationStartTime the onlineReplicationStartTime value to set + * @return the HyperVReplicaBluePolicyInput object itself. + */ + public HyperVReplicaBluePolicyInput withOnlineReplicationStartTime(String onlineReplicationStartTime) { + this.onlineReplicationStartTime = onlineReplicationStartTime; + return this; + } + + /** + * Get a value indicating the offline IR import path. + * + * @return the offlineReplicationImportPath value + */ + public String offlineReplicationImportPath() { + return this.offlineReplicationImportPath; + } + + /** + * Set a value indicating the offline IR import path. + * + * @param offlineReplicationImportPath the offlineReplicationImportPath value to set + * @return the HyperVReplicaBluePolicyInput object itself. + */ + public HyperVReplicaBluePolicyInput withOfflineReplicationImportPath(String offlineReplicationImportPath) { + this.offlineReplicationImportPath = offlineReplicationImportPath; + return this; + } + + /** + * Get a value indicating the offline IR export path. + * + * @return the offlineReplicationExportPath value + */ + public String offlineReplicationExportPath() { + return this.offlineReplicationExportPath; + } + + /** + * Set a value indicating the offline IR export path. + * + * @param offlineReplicationExportPath the offlineReplicationExportPath value to set + * @return the HyperVReplicaBluePolicyInput object itself. + */ + public HyperVReplicaBluePolicyInput withOfflineReplicationExportPath(String offlineReplicationExportPath) { + this.offlineReplicationExportPath = offlineReplicationExportPath; + return this; + } + + /** + * Get a value indicating the recovery HTTPS port. + * + * @return the replicationPort value + */ + public Integer replicationPort() { + return this.replicationPort; + } + + /** + * Set a value indicating the recovery HTTPS port. + * + * @param replicationPort the replicationPort value to set + * @return the HyperVReplicaBluePolicyInput object itself. + */ + public HyperVReplicaBluePolicyInput withReplicationPort(Integer replicationPort) { + this.replicationPort = replicationPort; + return this; + } + + /** + * Get a value indicating the authentication type. + * + * @return the allowedAuthenticationType value + */ + public Integer allowedAuthenticationType() { + return this.allowedAuthenticationType; + } + + /** + * Set a value indicating the authentication type. + * + * @param allowedAuthenticationType the allowedAuthenticationType value to set + * @return the HyperVReplicaBluePolicyInput object itself. + */ + public HyperVReplicaBluePolicyInput withAllowedAuthenticationType(Integer allowedAuthenticationType) { + this.allowedAuthenticationType = allowedAuthenticationType; + return this; + } + + /** + * Get a value indicating whether the VM has to be auto deleted. + * + * @return the replicaDeletion value + */ + public String replicaDeletion() { + return this.replicaDeletion; + } + + /** + * Set a value indicating whether the VM has to be auto deleted. + * + * @param replicaDeletion the replicaDeletion value to set + * @return the HyperVReplicaBluePolicyInput object itself. + */ + public HyperVReplicaBluePolicyInput withReplicaDeletion(String replicaDeletion) { + this.replicaDeletion = replicaDeletion; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBlueReplicationDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBlueReplicationDetails.java new file mode 100644 index 0000000000000..fde12977f8293 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaBlueReplicationDetails.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * HyperV replica 2012 R2 (Blue) replication details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplica2012R2") +public class HyperVReplicaBlueReplicationDetails extends ReplicationProviderSpecificSettings { + /** + * The Last replication time. + */ + @JsonProperty(value = "lastReplicatedTime") + private DateTime lastReplicatedTime; + + /** + * The PE Network details. + */ + @JsonProperty(value = "vmNics") + private List vmNics; + + /** + * The virtual machine Id. + */ + @JsonProperty(value = "vmId") + private String vmId; + + /** + * The protection state for the vm. + */ + @JsonProperty(value = "vmProtectionState") + private String vmProtectionState; + + /** + * The protection state description for the vm. + */ + @JsonProperty(value = "vmProtectionStateDescription") + private String vmProtectionStateDescription; + + /** + * Initial replication details. + */ + @JsonProperty(value = "initialReplicationDetails") + private InitialReplicationDetails initialReplicationDetails; + + /** + * VM disk details. + */ + @JsonProperty(value = "vMDiskDetails") + private List vMDiskDetails; + + /** + * Get the Last replication time. + * + * @return the lastReplicatedTime value + */ + public DateTime lastReplicatedTime() { + return this.lastReplicatedTime; + } + + /** + * Set the Last replication time. + * + * @param lastReplicatedTime the lastReplicatedTime value to set + * @return the HyperVReplicaBlueReplicationDetails object itself. + */ + public HyperVReplicaBlueReplicationDetails withLastReplicatedTime(DateTime lastReplicatedTime) { + this.lastReplicatedTime = lastReplicatedTime; + return this; + } + + /** + * Get the PE Network details. + * + * @return the vmNics value + */ + public List vmNics() { + return this.vmNics; + } + + /** + * Set the PE Network details. + * + * @param vmNics the vmNics value to set + * @return the HyperVReplicaBlueReplicationDetails object itself. + */ + public HyperVReplicaBlueReplicationDetails withVmNics(List vmNics) { + this.vmNics = vmNics; + return this; + } + + /** + * Get the virtual machine Id. + * + * @return the vmId value + */ + public String vmId() { + return this.vmId; + } + + /** + * Set the virtual machine Id. + * + * @param vmId the vmId value to set + * @return the HyperVReplicaBlueReplicationDetails object itself. + */ + public HyperVReplicaBlueReplicationDetails withVmId(String vmId) { + this.vmId = vmId; + return this; + } + + /** + * Get the protection state for the vm. + * + * @return the vmProtectionState value + */ + public String vmProtectionState() { + return this.vmProtectionState; + } + + /** + * Set the protection state for the vm. + * + * @param vmProtectionState the vmProtectionState value to set + * @return the HyperVReplicaBlueReplicationDetails object itself. + */ + public HyperVReplicaBlueReplicationDetails withVmProtectionState(String vmProtectionState) { + this.vmProtectionState = vmProtectionState; + return this; + } + + /** + * Get the protection state description for the vm. + * + * @return the vmProtectionStateDescription value + */ + public String vmProtectionStateDescription() { + return this.vmProtectionStateDescription; + } + + /** + * Set the protection state description for the vm. + * + * @param vmProtectionStateDescription the vmProtectionStateDescription value to set + * @return the HyperVReplicaBlueReplicationDetails object itself. + */ + public HyperVReplicaBlueReplicationDetails withVmProtectionStateDescription(String vmProtectionStateDescription) { + this.vmProtectionStateDescription = vmProtectionStateDescription; + return this; + } + + /** + * Get initial replication details. + * + * @return the initialReplicationDetails value + */ + public InitialReplicationDetails initialReplicationDetails() { + return this.initialReplicationDetails; + } + + /** + * Set initial replication details. + * + * @param initialReplicationDetails the initialReplicationDetails value to set + * @return the HyperVReplicaBlueReplicationDetails object itself. + */ + public HyperVReplicaBlueReplicationDetails withInitialReplicationDetails(InitialReplicationDetails initialReplicationDetails) { + this.initialReplicationDetails = initialReplicationDetails; + return this; + } + + /** + * Get vM disk details. + * + * @return the vMDiskDetails value + */ + public List vMDiskDetails() { + return this.vMDiskDetails; + } + + /** + * Set vM disk details. + * + * @param vMDiskDetails the vMDiskDetails value to set + * @return the HyperVReplicaBlueReplicationDetails object itself. + */ + public HyperVReplicaBlueReplicationDetails withVMDiskDetails(List vMDiskDetails) { + this.vMDiskDetails = vMDiskDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaPolicyDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaPolicyDetails.java new file mode 100644 index 0000000000000..94f4146ce2f0d --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaPolicyDetails.java @@ -0,0 +1,282 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Hyper-V Replica Blue specific protection profile details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplica2012") +public class HyperVReplicaPolicyDetails extends PolicyProviderSpecificDetails { + /** + * A value indicating the number of recovery points. + */ + @JsonProperty(value = "recoveryPoints") + private Integer recoveryPoints; + + /** + * A value indicating the application consistent frequency. + */ + @JsonProperty(value = "applicationConsistentSnapshotFrequencyInHours") + private Integer applicationConsistentSnapshotFrequencyInHours; + + /** + * A value indicating whether compression has to be enabled. + */ + @JsonProperty(value = "compression") + private String compression; + + /** + * A value indicating whether IR is online. + */ + @JsonProperty(value = "initialReplicationMethod") + private String initialReplicationMethod; + + /** + * A value indicating the online IR start time. + */ + @JsonProperty(value = "onlineReplicationStartTime") + private String onlineReplicationStartTime; + + /** + * A value indicating the offline IR import path. + */ + @JsonProperty(value = "offlineReplicationImportPath") + private String offlineReplicationImportPath; + + /** + * A value indicating the offline IR export path. + */ + @JsonProperty(value = "offlineReplicationExportPath") + private String offlineReplicationExportPath; + + /** + * A value indicating the recovery HTTPS port. + */ + @JsonProperty(value = "replicationPort") + private Integer replicationPort; + + /** + * A value indicating the authentication type. + */ + @JsonProperty(value = "allowedAuthenticationType") + private Integer allowedAuthenticationType; + + /** + * A value indicating whether the VM has to be auto deleted. Supported + * Values: String.Empty, None, OnRecoveryCloud. + */ + @JsonProperty(value = "replicaDeletionOption") + private String replicaDeletionOption; + + /** + * Get a value indicating the number of recovery points. + * + * @return the recoveryPoints value + */ + public Integer recoveryPoints() { + return this.recoveryPoints; + } + + /** + * Set a value indicating the number of recovery points. + * + * @param recoveryPoints the recoveryPoints value to set + * @return the HyperVReplicaPolicyDetails object itself. + */ + public HyperVReplicaPolicyDetails withRecoveryPoints(Integer recoveryPoints) { + this.recoveryPoints = recoveryPoints; + return this; + } + + /** + * Get a value indicating the application consistent frequency. + * + * @return the applicationConsistentSnapshotFrequencyInHours value + */ + public Integer applicationConsistentSnapshotFrequencyInHours() { + return this.applicationConsistentSnapshotFrequencyInHours; + } + + /** + * Set a value indicating the application consistent frequency. + * + * @param applicationConsistentSnapshotFrequencyInHours the applicationConsistentSnapshotFrequencyInHours value to set + * @return the HyperVReplicaPolicyDetails object itself. + */ + public HyperVReplicaPolicyDetails withApplicationConsistentSnapshotFrequencyInHours(Integer applicationConsistentSnapshotFrequencyInHours) { + this.applicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + return this; + } + + /** + * Get a value indicating whether compression has to be enabled. + * + * @return the compression value + */ + public String compression() { + return this.compression; + } + + /** + * Set a value indicating whether compression has to be enabled. + * + * @param compression the compression value to set + * @return the HyperVReplicaPolicyDetails object itself. + */ + public HyperVReplicaPolicyDetails withCompression(String compression) { + this.compression = compression; + return this; + } + + /** + * Get a value indicating whether IR is online. + * + * @return the initialReplicationMethod value + */ + public String initialReplicationMethod() { + return this.initialReplicationMethod; + } + + /** + * Set a value indicating whether IR is online. + * + * @param initialReplicationMethod the initialReplicationMethod value to set + * @return the HyperVReplicaPolicyDetails object itself. + */ + public HyperVReplicaPolicyDetails withInitialReplicationMethod(String initialReplicationMethod) { + this.initialReplicationMethod = initialReplicationMethod; + return this; + } + + /** + * Get a value indicating the online IR start time. + * + * @return the onlineReplicationStartTime value + */ + public String onlineReplicationStartTime() { + return this.onlineReplicationStartTime; + } + + /** + * Set a value indicating the online IR start time. + * + * @param onlineReplicationStartTime the onlineReplicationStartTime value to set + * @return the HyperVReplicaPolicyDetails object itself. + */ + public HyperVReplicaPolicyDetails withOnlineReplicationStartTime(String onlineReplicationStartTime) { + this.onlineReplicationStartTime = onlineReplicationStartTime; + return this; + } + + /** + * Get a value indicating the offline IR import path. + * + * @return the offlineReplicationImportPath value + */ + public String offlineReplicationImportPath() { + return this.offlineReplicationImportPath; + } + + /** + * Set a value indicating the offline IR import path. + * + * @param offlineReplicationImportPath the offlineReplicationImportPath value to set + * @return the HyperVReplicaPolicyDetails object itself. + */ + public HyperVReplicaPolicyDetails withOfflineReplicationImportPath(String offlineReplicationImportPath) { + this.offlineReplicationImportPath = offlineReplicationImportPath; + return this; + } + + /** + * Get a value indicating the offline IR export path. + * + * @return the offlineReplicationExportPath value + */ + public String offlineReplicationExportPath() { + return this.offlineReplicationExportPath; + } + + /** + * Set a value indicating the offline IR export path. + * + * @param offlineReplicationExportPath the offlineReplicationExportPath value to set + * @return the HyperVReplicaPolicyDetails object itself. + */ + public HyperVReplicaPolicyDetails withOfflineReplicationExportPath(String offlineReplicationExportPath) { + this.offlineReplicationExportPath = offlineReplicationExportPath; + return this; + } + + /** + * Get a value indicating the recovery HTTPS port. + * + * @return the replicationPort value + */ + public Integer replicationPort() { + return this.replicationPort; + } + + /** + * Set a value indicating the recovery HTTPS port. + * + * @param replicationPort the replicationPort value to set + * @return the HyperVReplicaPolicyDetails object itself. + */ + public HyperVReplicaPolicyDetails withReplicationPort(Integer replicationPort) { + this.replicationPort = replicationPort; + return this; + } + + /** + * Get a value indicating the authentication type. + * + * @return the allowedAuthenticationType value + */ + public Integer allowedAuthenticationType() { + return this.allowedAuthenticationType; + } + + /** + * Set a value indicating the authentication type. + * + * @param allowedAuthenticationType the allowedAuthenticationType value to set + * @return the HyperVReplicaPolicyDetails object itself. + */ + public HyperVReplicaPolicyDetails withAllowedAuthenticationType(Integer allowedAuthenticationType) { + this.allowedAuthenticationType = allowedAuthenticationType; + return this; + } + + /** + * Get a value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud. + * + * @return the replicaDeletionOption value + */ + public String replicaDeletionOption() { + return this.replicaDeletionOption; + } + + /** + * Set a value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud. + * + * @param replicaDeletionOption the replicaDeletionOption value to set + * @return the HyperVReplicaPolicyDetails object itself. + */ + public HyperVReplicaPolicyDetails withReplicaDeletionOption(String replicaDeletionOption) { + this.replicaDeletionOption = replicaDeletionOption; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaPolicyInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaPolicyInput.java new file mode 100644 index 0000000000000..9972fca02645e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaPolicyInput.java @@ -0,0 +1,281 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Hyper-V Replica specific protection profile Input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplica2012") +public class HyperVReplicaPolicyInput extends PolicyProviderSpecificInput { + /** + * A value indicating the number of recovery points. + */ + @JsonProperty(value = "recoveryPoints") + private Integer recoveryPoints; + + /** + * A value indicating the application consistent frequency. + */ + @JsonProperty(value = "applicationConsistentSnapshotFrequencyInHours") + private Integer applicationConsistentSnapshotFrequencyInHours; + + /** + * A value indicating whether compression has to be enabled. + */ + @JsonProperty(value = "compression") + private String compression; + + /** + * A value indicating whether IR is online. + */ + @JsonProperty(value = "initialReplicationMethod") + private String initialReplicationMethod; + + /** + * A value indicating the online IR start time. + */ + @JsonProperty(value = "onlineReplicationStartTime") + private String onlineReplicationStartTime; + + /** + * A value indicating the offline IR import path. + */ + @JsonProperty(value = "offlineReplicationImportPath") + private String offlineReplicationImportPath; + + /** + * A value indicating the offline IR export path. + */ + @JsonProperty(value = "offlineReplicationExportPath") + private String offlineReplicationExportPath; + + /** + * A value indicating the recovery HTTPS port. + */ + @JsonProperty(value = "replicationPort") + private Integer replicationPort; + + /** + * A value indicating the authentication type. + */ + @JsonProperty(value = "allowedAuthenticationType") + private Integer allowedAuthenticationType; + + /** + * A value indicating whether the VM has to be auto deleted. + */ + @JsonProperty(value = "replicaDeletion") + private String replicaDeletion; + + /** + * Get a value indicating the number of recovery points. + * + * @return the recoveryPoints value + */ + public Integer recoveryPoints() { + return this.recoveryPoints; + } + + /** + * Set a value indicating the number of recovery points. + * + * @param recoveryPoints the recoveryPoints value to set + * @return the HyperVReplicaPolicyInput object itself. + */ + public HyperVReplicaPolicyInput withRecoveryPoints(Integer recoveryPoints) { + this.recoveryPoints = recoveryPoints; + return this; + } + + /** + * Get a value indicating the application consistent frequency. + * + * @return the applicationConsistentSnapshotFrequencyInHours value + */ + public Integer applicationConsistentSnapshotFrequencyInHours() { + return this.applicationConsistentSnapshotFrequencyInHours; + } + + /** + * Set a value indicating the application consistent frequency. + * + * @param applicationConsistentSnapshotFrequencyInHours the applicationConsistentSnapshotFrequencyInHours value to set + * @return the HyperVReplicaPolicyInput object itself. + */ + public HyperVReplicaPolicyInput withApplicationConsistentSnapshotFrequencyInHours(Integer applicationConsistentSnapshotFrequencyInHours) { + this.applicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + return this; + } + + /** + * Get a value indicating whether compression has to be enabled. + * + * @return the compression value + */ + public String compression() { + return this.compression; + } + + /** + * Set a value indicating whether compression has to be enabled. + * + * @param compression the compression value to set + * @return the HyperVReplicaPolicyInput object itself. + */ + public HyperVReplicaPolicyInput withCompression(String compression) { + this.compression = compression; + return this; + } + + /** + * Get a value indicating whether IR is online. + * + * @return the initialReplicationMethod value + */ + public String initialReplicationMethod() { + return this.initialReplicationMethod; + } + + /** + * Set a value indicating whether IR is online. + * + * @param initialReplicationMethod the initialReplicationMethod value to set + * @return the HyperVReplicaPolicyInput object itself. + */ + public HyperVReplicaPolicyInput withInitialReplicationMethod(String initialReplicationMethod) { + this.initialReplicationMethod = initialReplicationMethod; + return this; + } + + /** + * Get a value indicating the online IR start time. + * + * @return the onlineReplicationStartTime value + */ + public String onlineReplicationStartTime() { + return this.onlineReplicationStartTime; + } + + /** + * Set a value indicating the online IR start time. + * + * @param onlineReplicationStartTime the onlineReplicationStartTime value to set + * @return the HyperVReplicaPolicyInput object itself. + */ + public HyperVReplicaPolicyInput withOnlineReplicationStartTime(String onlineReplicationStartTime) { + this.onlineReplicationStartTime = onlineReplicationStartTime; + return this; + } + + /** + * Get a value indicating the offline IR import path. + * + * @return the offlineReplicationImportPath value + */ + public String offlineReplicationImportPath() { + return this.offlineReplicationImportPath; + } + + /** + * Set a value indicating the offline IR import path. + * + * @param offlineReplicationImportPath the offlineReplicationImportPath value to set + * @return the HyperVReplicaPolicyInput object itself. + */ + public HyperVReplicaPolicyInput withOfflineReplicationImportPath(String offlineReplicationImportPath) { + this.offlineReplicationImportPath = offlineReplicationImportPath; + return this; + } + + /** + * Get a value indicating the offline IR export path. + * + * @return the offlineReplicationExportPath value + */ + public String offlineReplicationExportPath() { + return this.offlineReplicationExportPath; + } + + /** + * Set a value indicating the offline IR export path. + * + * @param offlineReplicationExportPath the offlineReplicationExportPath value to set + * @return the HyperVReplicaPolicyInput object itself. + */ + public HyperVReplicaPolicyInput withOfflineReplicationExportPath(String offlineReplicationExportPath) { + this.offlineReplicationExportPath = offlineReplicationExportPath; + return this; + } + + /** + * Get a value indicating the recovery HTTPS port. + * + * @return the replicationPort value + */ + public Integer replicationPort() { + return this.replicationPort; + } + + /** + * Set a value indicating the recovery HTTPS port. + * + * @param replicationPort the replicationPort value to set + * @return the HyperVReplicaPolicyInput object itself. + */ + public HyperVReplicaPolicyInput withReplicationPort(Integer replicationPort) { + this.replicationPort = replicationPort; + return this; + } + + /** + * Get a value indicating the authentication type. + * + * @return the allowedAuthenticationType value + */ + public Integer allowedAuthenticationType() { + return this.allowedAuthenticationType; + } + + /** + * Set a value indicating the authentication type. + * + * @param allowedAuthenticationType the allowedAuthenticationType value to set + * @return the HyperVReplicaPolicyInput object itself. + */ + public HyperVReplicaPolicyInput withAllowedAuthenticationType(Integer allowedAuthenticationType) { + this.allowedAuthenticationType = allowedAuthenticationType; + return this; + } + + /** + * Get a value indicating whether the VM has to be auto deleted. + * + * @return the replicaDeletion value + */ + public String replicaDeletion() { + return this.replicaDeletion; + } + + /** + * Set a value indicating whether the VM has to be auto deleted. + * + * @param replicaDeletion the replicaDeletion value to set + * @return the HyperVReplicaPolicyInput object itself. + */ + public HyperVReplicaPolicyInput withReplicaDeletion(String replicaDeletion) { + this.replicaDeletion = replicaDeletion; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaReplicationDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaReplicationDetails.java new file mode 100644 index 0000000000000..18665a54792ab --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVReplicaReplicationDetails.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * HyperV replica 2012 replication details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplica2012") +public class HyperVReplicaReplicationDetails extends ReplicationProviderSpecificSettings { + /** + * The Last replication time. + */ + @JsonProperty(value = "lastReplicatedTime") + private DateTime lastReplicatedTime; + + /** + * The PE Network details. + */ + @JsonProperty(value = "vmNics") + private List vmNics; + + /** + * The virtual machine Id. + */ + @JsonProperty(value = "vmId") + private String vmId; + + /** + * The protection state for the vm. + */ + @JsonProperty(value = "vmProtectionState") + private String vmProtectionState; + + /** + * The protection state description for the vm. + */ + @JsonProperty(value = "vmProtectionStateDescription") + private String vmProtectionStateDescription; + + /** + * Initial replication details. + */ + @JsonProperty(value = "initialReplicationDetails") + private InitialReplicationDetails initialReplicationDetails; + + /** + * VM disk details. + */ + @JsonProperty(value = "vMDiskDetails") + private List vMDiskDetails; + + /** + * Get the Last replication time. + * + * @return the lastReplicatedTime value + */ + public DateTime lastReplicatedTime() { + return this.lastReplicatedTime; + } + + /** + * Set the Last replication time. + * + * @param lastReplicatedTime the lastReplicatedTime value to set + * @return the HyperVReplicaReplicationDetails object itself. + */ + public HyperVReplicaReplicationDetails withLastReplicatedTime(DateTime lastReplicatedTime) { + this.lastReplicatedTime = lastReplicatedTime; + return this; + } + + /** + * Get the PE Network details. + * + * @return the vmNics value + */ + public List vmNics() { + return this.vmNics; + } + + /** + * Set the PE Network details. + * + * @param vmNics the vmNics value to set + * @return the HyperVReplicaReplicationDetails object itself. + */ + public HyperVReplicaReplicationDetails withVmNics(List vmNics) { + this.vmNics = vmNics; + return this; + } + + /** + * Get the virtual machine Id. + * + * @return the vmId value + */ + public String vmId() { + return this.vmId; + } + + /** + * Set the virtual machine Id. + * + * @param vmId the vmId value to set + * @return the HyperVReplicaReplicationDetails object itself. + */ + public HyperVReplicaReplicationDetails withVmId(String vmId) { + this.vmId = vmId; + return this; + } + + /** + * Get the protection state for the vm. + * + * @return the vmProtectionState value + */ + public String vmProtectionState() { + return this.vmProtectionState; + } + + /** + * Set the protection state for the vm. + * + * @param vmProtectionState the vmProtectionState value to set + * @return the HyperVReplicaReplicationDetails object itself. + */ + public HyperVReplicaReplicationDetails withVmProtectionState(String vmProtectionState) { + this.vmProtectionState = vmProtectionState; + return this; + } + + /** + * Get the protection state description for the vm. + * + * @return the vmProtectionStateDescription value + */ + public String vmProtectionStateDescription() { + return this.vmProtectionStateDescription; + } + + /** + * Set the protection state description for the vm. + * + * @param vmProtectionStateDescription the vmProtectionStateDescription value to set + * @return the HyperVReplicaReplicationDetails object itself. + */ + public HyperVReplicaReplicationDetails withVmProtectionStateDescription(String vmProtectionStateDescription) { + this.vmProtectionStateDescription = vmProtectionStateDescription; + return this; + } + + /** + * Get initial replication details. + * + * @return the initialReplicationDetails value + */ + public InitialReplicationDetails initialReplicationDetails() { + return this.initialReplicationDetails; + } + + /** + * Set initial replication details. + * + * @param initialReplicationDetails the initialReplicationDetails value to set + * @return the HyperVReplicaReplicationDetails object itself. + */ + public HyperVReplicaReplicationDetails withInitialReplicationDetails(InitialReplicationDetails initialReplicationDetails) { + this.initialReplicationDetails = initialReplicationDetails; + return this; + } + + /** + * Get vM disk details. + * + * @return the vMDiskDetails value + */ + public List vMDiskDetails() { + return this.vMDiskDetails; + } + + /** + * Set vM disk details. + * + * @param vMDiskDetails the vMDiskDetails value to set + * @return the HyperVReplicaReplicationDetails object itself. + */ + public HyperVReplicaReplicationDetails withVMDiskDetails(List vMDiskDetails) { + this.vMDiskDetails = vMDiskDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVSiteDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVSiteDetails.java new file mode 100644 index 0000000000000..043a5e59e95b8 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVSiteDetails.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * HyperVSite fabric specific details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVSite") +public class HyperVSiteDetails extends FabricSpecificDetails { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVVirtualMachineDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVVirtualMachineDetails.java new file mode 100644 index 0000000000000..02f3d76781675 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/HyperVVirtualMachineDetails.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Hyper V replica provider specific settings. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVVirtualMachine") +public class HyperVVirtualMachineDetails extends ConfigurationSettings { + /** + * The source id of the object. + */ + @JsonProperty(value = "sourceItemId") + private String sourceItemId; + + /** + * The id of the object in fabric. + */ + @JsonProperty(value = "generation") + private String generation; + + /** + * The Last replication time. + */ + @JsonProperty(value = "osDetails") + private OSDetails osDetails; + + /** + * The Last successful failover time. + */ + @JsonProperty(value = "diskDetails") + private List diskDetails; + + /** + * Get the source id of the object. + * + * @return the sourceItemId value + */ + public String sourceItemId() { + return this.sourceItemId; + } + + /** + * Set the source id of the object. + * + * @param sourceItemId the sourceItemId value to set + * @return the HyperVVirtualMachineDetails object itself. + */ + public HyperVVirtualMachineDetails withSourceItemId(String sourceItemId) { + this.sourceItemId = sourceItemId; + return this; + } + + /** + * Get the id of the object in fabric. + * + * @return the generation value + */ + public String generation() { + return this.generation; + } + + /** + * Set the id of the object in fabric. + * + * @param generation the generation value to set + * @return the HyperVVirtualMachineDetails object itself. + */ + public HyperVVirtualMachineDetails withGeneration(String generation) { + this.generation = generation; + return this; + } + + /** + * Get the Last replication time. + * + * @return the osDetails value + */ + public OSDetails osDetails() { + return this.osDetails; + } + + /** + * Set the Last replication time. + * + * @param osDetails the osDetails value to set + * @return the HyperVVirtualMachineDetails object itself. + */ + public HyperVVirtualMachineDetails withOsDetails(OSDetails osDetails) { + this.osDetails = osDetails; + return this; + } + + /** + * Get the Last successful failover time. + * + * @return the diskDetails value + */ + public List diskDetails() { + return this.diskDetails; + } + + /** + * Set the Last successful failover time. + * + * @param diskDetails the diskDetails value to set + * @return the HyperVVirtualMachineDetails object itself. + */ + public HyperVVirtualMachineDetails withDiskDetails(List diskDetails) { + this.diskDetails = diskDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/IdentityInformation.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/IdentityInformation.java new file mode 100644 index 0000000000000..66d70c839e636 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/IdentityInformation.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Identity details. + */ +public class IdentityInformation { + /** + * The identity provider type. Value is the ToString() of a + * IdentityProviderType value. Possible values include: + * 'RecoveryServicesActiveDirectory', 'CustomerActiveDirectory'. + */ + @JsonProperty(value = "identityProviderType") + private IdentityProviderType identityProviderType; + + /** + * The tenant Id for the service principal with which the on-premise + * management/data plane components would communicate with our Azure + * services. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /** + * The application/client Id for the service principal with which the + * on-premise management/data plane components would communicate with our + * Azure services. + */ + @JsonProperty(value = "applicationId") + private String applicationId; + + /** + * The object Id of the service principal with which the on-premise + * management/data plane components would communicate with our Azure + * services. + */ + @JsonProperty(value = "objectId") + private String objectId; + + /** + * The intended Audience of the service principal with which the on-premise + * management/data plane components would communicate with our Azure + * services. + */ + @JsonProperty(value = "audience") + private String audience; + + /** + * The base authority for Azure Active Directory authentication. + */ + @JsonProperty(value = "aadAuthority") + private String aadAuthority; + + /** + * The certificate thumbprint. Applicable only if IdentityProviderType is + * RecoveryServicesActiveDirectory. + */ + @JsonProperty(value = "certificateThumbprint") + private String certificateThumbprint; + + /** + * Get the identity provider type. Value is the ToString() of a IdentityProviderType value. Possible values include: 'RecoveryServicesActiveDirectory', 'CustomerActiveDirectory'. + * + * @return the identityProviderType value + */ + public IdentityProviderType identityProviderType() { + return this.identityProviderType; + } + + /** + * Set the identity provider type. Value is the ToString() of a IdentityProviderType value. Possible values include: 'RecoveryServicesActiveDirectory', 'CustomerActiveDirectory'. + * + * @param identityProviderType the identityProviderType value to set + * @return the IdentityInformation object itself. + */ + public IdentityInformation withIdentityProviderType(IdentityProviderType identityProviderType) { + this.identityProviderType = identityProviderType; + return this; + } + + /** + * Get the tenant Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenant Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. + * + * @param tenantId the tenantId value to set + * @return the IdentityInformation object itself. + */ + public IdentityInformation withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the application/client Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. + * + * @return the applicationId value + */ + public String applicationId() { + return this.applicationId; + } + + /** + * Set the application/client Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. + * + * @param applicationId the applicationId value to set + * @return the IdentityInformation object itself. + */ + public IdentityInformation withApplicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Get the object Id of the service principal with which the on-premise management/data plane components would communicate with our Azure services. + * + * @return the objectId value + */ + public String objectId() { + return this.objectId; + } + + /** + * Set the object Id of the service principal with which the on-premise management/data plane components would communicate with our Azure services. + * + * @param objectId the objectId value to set + * @return the IdentityInformation object itself. + */ + public IdentityInformation withObjectId(String objectId) { + this.objectId = objectId; + return this; + } + + /** + * Get the intended Audience of the service principal with which the on-premise management/data plane components would communicate with our Azure services. + * + * @return the audience value + */ + public String audience() { + return this.audience; + } + + /** + * Set the intended Audience of the service principal with which the on-premise management/data plane components would communicate with our Azure services. + * + * @param audience the audience value to set + * @return the IdentityInformation object itself. + */ + public IdentityInformation withAudience(String audience) { + this.audience = audience; + return this; + } + + /** + * Get the base authority for Azure Active Directory authentication. + * + * @return the aadAuthority value + */ + public String aadAuthority() { + return this.aadAuthority; + } + + /** + * Set the base authority for Azure Active Directory authentication. + * + * @param aadAuthority the aadAuthority value to set + * @return the IdentityInformation object itself. + */ + public IdentityInformation withAadAuthority(String aadAuthority) { + this.aadAuthority = aadAuthority; + return this; + } + + /** + * Get the certificate thumbprint. Applicable only if IdentityProviderType is RecoveryServicesActiveDirectory. + * + * @return the certificateThumbprint value + */ + public String certificateThumbprint() { + return this.certificateThumbprint; + } + + /** + * Set the certificate thumbprint. Applicable only if IdentityProviderType is RecoveryServicesActiveDirectory. + * + * @param certificateThumbprint the certificateThumbprint value to set + * @return the IdentityInformation object itself. + */ + public IdentityInformation withCertificateThumbprint(String certificateThumbprint) { + this.certificateThumbprint = certificateThumbprint; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/IdentityProviderType.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/IdentityProviderType.java new file mode 100644 index 0000000000000..aa591aa59337f --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/IdentityProviderType.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for IdentityProviderType. + */ +public enum IdentityProviderType { + /** Enum value RecoveryServicesActiveDirectory. */ + RECOVERY_SERVICES_ACTIVE_DIRECTORY("RecoveryServicesActiveDirectory"), + + /** Enum value CustomerActiveDirectory. */ + CUSTOMER_ACTIVE_DIRECTORY("CustomerActiveDirectory"); + + /** The actual serialized value for a IdentityProviderType instance. */ + private String value; + + IdentityProviderType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a IdentityProviderType instance. + * + * @param value the serialized value to parse. + * @return the parsed IdentityProviderType object, or null if unable to parse. + */ + @JsonCreator + public static IdentityProviderType fromString(String value) { + IdentityProviderType[] items = IdentityProviderType.values(); + for (IdentityProviderType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAgentDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAgentDetails.java new file mode 100644 index 0000000000000..75eaa95c900f9 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAgentDetails.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The details of the InMage agent. + */ +public class InMageAgentDetails { + /** + * The agent version. + */ + @JsonProperty(value = "agentVersion") + private String agentVersion; + + /** + * A value indicating whether installed agent needs to be updated. + */ + @JsonProperty(value = "agentUpdateStatus") + private String agentUpdateStatus; + + /** + * A value indicating whether reboot is required after update is applied. + */ + @JsonProperty(value = "postUpdateRebootStatus") + private String postUpdateRebootStatus; + + /** + * 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 InMageAgentDetails object itself. + */ + public InMageAgentDetails withAgentVersion(String agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + /** + * Get a value indicating whether installed agent needs to be updated. + * + * @return the agentUpdateStatus value + */ + public String agentUpdateStatus() { + return this.agentUpdateStatus; + } + + /** + * Set a value indicating whether installed agent needs to be updated. + * + * @param agentUpdateStatus the agentUpdateStatus value to set + * @return the InMageAgentDetails object itself. + */ + public InMageAgentDetails withAgentUpdateStatus(String agentUpdateStatus) { + this.agentUpdateStatus = agentUpdateStatus; + return this; + } + + /** + * Get a value indicating whether reboot is required after update is applied. + * + * @return the postUpdateRebootStatus value + */ + public String postUpdateRebootStatus() { + return this.postUpdateRebootStatus; + } + + /** + * Set a value indicating whether reboot is required after update is applied. + * + * @param postUpdateRebootStatus the postUpdateRebootStatus value to set + * @return the InMageAgentDetails object itself. + */ + public InMageAgentDetails withPostUpdateRebootStatus(String postUpdateRebootStatus) { + this.postUpdateRebootStatus = postUpdateRebootStatus; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2ApplyRecoveryPointInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2ApplyRecoveryPointInput.java new file mode 100644 index 0000000000000..4753138e31460 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2ApplyRecoveryPointInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ApplyRecoveryPoint input specific to InMageAzureV2 provider. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMageAzureV2") +public class InMageAzureV2ApplyRecoveryPointInput extends ApplyRecoveryPointProviderSpecificInput { + /** + * The vault location where the recovery Vm resides. + */ + @JsonProperty(value = "vaultLocation") + private String vaultLocation; + + /** + * Get the vault location where the recovery Vm resides. + * + * @return the vaultLocation value + */ + public String vaultLocation() { + return this.vaultLocation; + } + + /** + * Set the vault location where the recovery Vm resides. + * + * @param vaultLocation the vaultLocation value to set + * @return the InMageAzureV2ApplyRecoveryPointInput object itself. + */ + public InMageAzureV2ApplyRecoveryPointInput withVaultLocation(String vaultLocation) { + this.vaultLocation = vaultLocation; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2EnableProtectionInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2EnableProtectionInput.java new file mode 100644 index 0000000000000..afe212f8937a7 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2EnableProtectionInput.java @@ -0,0 +1,415 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * VMware Azure specific enable protection input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMageAzureV2") +public class InMageAzureV2EnableProtectionInput extends EnableProtectionProviderSpecificInput { + /** + * The Master target Id. + */ + @JsonProperty(value = "masterTargetId") + private String masterTargetId; + + /** + * The Process Server Id. + */ + @JsonProperty(value = "processServerId") + private String processServerId; + + /** + * The storage account name. + */ + @JsonProperty(value = "storageAccountId", required = true) + private String storageAccountId; + + /** + * The CS account Id. + */ + @JsonProperty(value = "runAsAccountId") + private String runAsAccountId; + + /** + * The multi vm group Id. + */ + @JsonProperty(value = "multiVmGroupId") + private String multiVmGroupId; + + /** + * The multi vm group name. + */ + @JsonProperty(value = "multiVmGroupName") + private String multiVmGroupName; + + /** + * The disks to include list. + */ + @JsonProperty(value = "disksToInclude") + private List disksToInclude; + + /** + * The selected target Azure network Id. + */ + @JsonProperty(value = "targetAzureNetworkId") + private String targetAzureNetworkId; + + /** + * The selected target Azure subnet Id. + */ + @JsonProperty(value = "targetAzureSubnetId") + private String targetAzureSubnetId; + + /** + * The selected option to enable RDP\SSH on target vm after failover. + * String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + */ + @JsonProperty(value = "enableRDPOnTargetOption") + private String enableRDPOnTargetOption; + + /** + * The target azure Vm Name. + */ + @JsonProperty(value = "targetAzureVmName") + private String targetAzureVmName; + + /** + * The storage account to be used for logging during replication. + */ + @JsonProperty(value = "logStorageAccountId") + private String logStorageAccountId; + + /** + * The Id of the target resource group (for classic deployment) in which + * the failover VM is to be created. + */ + @JsonProperty(value = "targetAzureV1ResourceGroupId") + private String targetAzureV1ResourceGroupId; + + /** + * The Id of the target resource group (for resource manager deployment) in + * which the failover VM is to be created. + */ + @JsonProperty(value = "targetAzureV2ResourceGroupId") + private String targetAzureV2ResourceGroupId; + + /** + * A value indicating whether managed disks should be used during failover. + */ + @JsonProperty(value = "useManagedDisks") + private String useManagedDisks; + + /** + * Get the Master target Id. + * + * @return the masterTargetId value + */ + public String masterTargetId() { + return this.masterTargetId; + } + + /** + * Set the Master target Id. + * + * @param masterTargetId the masterTargetId value to set + * @return the InMageAzureV2EnableProtectionInput object itself. + */ + public InMageAzureV2EnableProtectionInput withMasterTargetId(String masterTargetId) { + this.masterTargetId = masterTargetId; + return this; + } + + /** + * Get the Process Server Id. + * + * @return the processServerId value + */ + public String processServerId() { + return this.processServerId; + } + + /** + * Set the Process Server Id. + * + * @param processServerId the processServerId value to set + * @return the InMageAzureV2EnableProtectionInput object itself. + */ + public InMageAzureV2EnableProtectionInput withProcessServerId(String processServerId) { + this.processServerId = processServerId; + return this; + } + + /** + * Get the storage account name. + * + * @return the storageAccountId value + */ + public String storageAccountId() { + return this.storageAccountId; + } + + /** + * Set the storage account name. + * + * @param storageAccountId the storageAccountId value to set + * @return the InMageAzureV2EnableProtectionInput object itself. + */ + public InMageAzureV2EnableProtectionInput withStorageAccountId(String storageAccountId) { + this.storageAccountId = storageAccountId; + return this; + } + + /** + * Get the CS account Id. + * + * @return the runAsAccountId value + */ + public String runAsAccountId() { + return this.runAsAccountId; + } + + /** + * Set the CS account Id. + * + * @param runAsAccountId the runAsAccountId value to set + * @return the InMageAzureV2EnableProtectionInput object itself. + */ + public InMageAzureV2EnableProtectionInput withRunAsAccountId(String runAsAccountId) { + this.runAsAccountId = runAsAccountId; + return this; + } + + /** + * Get the multi vm group Id. + * + * @return the multiVmGroupId value + */ + public String multiVmGroupId() { + return this.multiVmGroupId; + } + + /** + * Set the multi vm group Id. + * + * @param multiVmGroupId the multiVmGroupId value to set + * @return the InMageAzureV2EnableProtectionInput object itself. + */ + public InMageAzureV2EnableProtectionInput withMultiVmGroupId(String multiVmGroupId) { + this.multiVmGroupId = multiVmGroupId; + return this; + } + + /** + * Get the multi vm group name. + * + * @return the multiVmGroupName value + */ + public String multiVmGroupName() { + return this.multiVmGroupName; + } + + /** + * Set the multi vm group name. + * + * @param multiVmGroupName the multiVmGroupName value to set + * @return the InMageAzureV2EnableProtectionInput object itself. + */ + public InMageAzureV2EnableProtectionInput withMultiVmGroupName(String multiVmGroupName) { + this.multiVmGroupName = multiVmGroupName; + return this; + } + + /** + * Get the disks to include list. + * + * @return the disksToInclude value + */ + public List disksToInclude() { + return this.disksToInclude; + } + + /** + * Set the disks to include list. + * + * @param disksToInclude the disksToInclude value to set + * @return the InMageAzureV2EnableProtectionInput object itself. + */ + public InMageAzureV2EnableProtectionInput withDisksToInclude(List disksToInclude) { + this.disksToInclude = disksToInclude; + return this; + } + + /** + * Get the selected target Azure network Id. + * + * @return the targetAzureNetworkId value + */ + public String targetAzureNetworkId() { + return this.targetAzureNetworkId; + } + + /** + * Set the selected target Azure network Id. + * + * @param targetAzureNetworkId the targetAzureNetworkId value to set + * @return the InMageAzureV2EnableProtectionInput object itself. + */ + public InMageAzureV2EnableProtectionInput withTargetAzureNetworkId(String targetAzureNetworkId) { + this.targetAzureNetworkId = targetAzureNetworkId; + return this; + } + + /** + * Get the selected target Azure subnet Id. + * + * @return the targetAzureSubnetId value + */ + public String targetAzureSubnetId() { + return this.targetAzureSubnetId; + } + + /** + * Set the selected target Azure subnet Id. + * + * @param targetAzureSubnetId the targetAzureSubnetId value to set + * @return the InMageAzureV2EnableProtectionInput object itself. + */ + public InMageAzureV2EnableProtectionInput withTargetAzureSubnetId(String targetAzureSubnetId) { + this.targetAzureSubnetId = targetAzureSubnetId; + return this; + } + + /** + * Get the selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + * + * @return the enableRDPOnTargetOption value + */ + public String enableRDPOnTargetOption() { + return this.enableRDPOnTargetOption; + } + + /** + * Set the selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + * + * @param enableRDPOnTargetOption the enableRDPOnTargetOption value to set + * @return the InMageAzureV2EnableProtectionInput object itself. + */ + public InMageAzureV2EnableProtectionInput withEnableRDPOnTargetOption(String enableRDPOnTargetOption) { + this.enableRDPOnTargetOption = enableRDPOnTargetOption; + return this; + } + + /** + * Get the target azure Vm Name. + * + * @return the targetAzureVmName value + */ + public String targetAzureVmName() { + return this.targetAzureVmName; + } + + /** + * Set the target azure Vm Name. + * + * @param targetAzureVmName the targetAzureVmName value to set + * @return the InMageAzureV2EnableProtectionInput object itself. + */ + public InMageAzureV2EnableProtectionInput withTargetAzureVmName(String targetAzureVmName) { + this.targetAzureVmName = targetAzureVmName; + return this; + } + + /** + * Get the storage account to be used for logging during replication. + * + * @return the logStorageAccountId value + */ + public String logStorageAccountId() { + return this.logStorageAccountId; + } + + /** + * Set the storage account to be used for logging during replication. + * + * @param logStorageAccountId the logStorageAccountId value to set + * @return the InMageAzureV2EnableProtectionInput object itself. + */ + public InMageAzureV2EnableProtectionInput withLogStorageAccountId(String logStorageAccountId) { + this.logStorageAccountId = logStorageAccountId; + return this; + } + + /** + * Get the Id of the target resource group (for classic deployment) in which the failover VM is to be created. + * + * @return the targetAzureV1ResourceGroupId value + */ + public String targetAzureV1ResourceGroupId() { + return this.targetAzureV1ResourceGroupId; + } + + /** + * Set the Id of the target resource group (for classic deployment) in which the failover VM is to be created. + * + * @param targetAzureV1ResourceGroupId the targetAzureV1ResourceGroupId value to set + * @return the InMageAzureV2EnableProtectionInput object itself. + */ + public InMageAzureV2EnableProtectionInput withTargetAzureV1ResourceGroupId(String targetAzureV1ResourceGroupId) { + this.targetAzureV1ResourceGroupId = targetAzureV1ResourceGroupId; + return this; + } + + /** + * Get the Id of the target resource group (for resource manager deployment) in which the failover VM is to be created. + * + * @return the targetAzureV2ResourceGroupId value + */ + public String targetAzureV2ResourceGroupId() { + return this.targetAzureV2ResourceGroupId; + } + + /** + * Set the Id of the target resource group (for resource manager deployment) in which the failover VM is to be created. + * + * @param targetAzureV2ResourceGroupId the targetAzureV2ResourceGroupId value to set + * @return the InMageAzureV2EnableProtectionInput object itself. + */ + public InMageAzureV2EnableProtectionInput withTargetAzureV2ResourceGroupId(String targetAzureV2ResourceGroupId) { + this.targetAzureV2ResourceGroupId = targetAzureV2ResourceGroupId; + return this; + } + + /** + * Get a value indicating whether managed disks should be used during failover. + * + * @return the useManagedDisks value + */ + public String useManagedDisks() { + return this.useManagedDisks; + } + + /** + * Set a value indicating whether managed disks should be used during failover. + * + * @param useManagedDisks the useManagedDisks value to set + * @return the InMageAzureV2EnableProtectionInput object itself. + */ + public InMageAzureV2EnableProtectionInput withUseManagedDisks(String useManagedDisks) { + this.useManagedDisks = useManagedDisks; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2EventDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2EventDetails.java new file mode 100644 index 0000000000000..a79f8dbc28118 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2EventDetails.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Model class for event details of a VMwareAzureV2 event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMageAzureV2") +public class InMageAzureV2EventDetails extends EventProviderSpecificDetails { + /** + * InMage Event type. Takes one of the values of + * {InMageDataContract.InMageMonitoringEventType}. + */ + @JsonProperty(value = "eventType") + private String eventType; + + /** + * InMage Event Category. + */ + @JsonProperty(value = "category") + private String category; + + /** + * InMage Event Component. + */ + @JsonProperty(value = "component") + private String component; + + /** + * Corrective Action string for the event. + */ + @JsonProperty(value = "correctiveAction") + private String correctiveAction; + + /** + * InMage Event Details. + */ + @JsonProperty(value = "details") + private String details; + + /** + * InMage Event Summary. + */ + @JsonProperty(value = "summary") + private String summary; + + /** + * VMware Site name. + */ + @JsonProperty(value = "siteName") + private String siteName; + + /** + * Get inMage Event type. Takes one of the values of {InMageDataContract.InMageMonitoringEventType}. + * + * @return the eventType value + */ + public String eventType() { + return this.eventType; + } + + /** + * Set inMage Event type. Takes one of the values of {InMageDataContract.InMageMonitoringEventType}. + * + * @param eventType the eventType value to set + * @return the InMageAzureV2EventDetails object itself. + */ + public InMageAzureV2EventDetails withEventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * Get inMage Event Category. + * + * @return the category value + */ + public String category() { + return this.category; + } + + /** + * Set inMage Event Category. + * + * @param category the category value to set + * @return the InMageAzureV2EventDetails object itself. + */ + public InMageAzureV2EventDetails withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get inMage Event Component. + * + * @return the component value + */ + public String component() { + return this.component; + } + + /** + * Set inMage Event Component. + * + * @param component the component value to set + * @return the InMageAzureV2EventDetails object itself. + */ + public InMageAzureV2EventDetails withComponent(String component) { + this.component = component; + return this; + } + + /** + * Get corrective Action string for the event. + * + * @return the correctiveAction value + */ + public String correctiveAction() { + return this.correctiveAction; + } + + /** + * Set corrective Action string for the event. + * + * @param correctiveAction the correctiveAction value to set + * @return the InMageAzureV2EventDetails object itself. + */ + public InMageAzureV2EventDetails withCorrectiveAction(String correctiveAction) { + this.correctiveAction = correctiveAction; + return this; + } + + /** + * Get inMage Event Details. + * + * @return the details value + */ + public String details() { + return this.details; + } + + /** + * Set inMage Event Details. + * + * @param details the details value to set + * @return the InMageAzureV2EventDetails object itself. + */ + public InMageAzureV2EventDetails withDetails(String details) { + this.details = details; + return this; + } + + /** + * Get inMage Event Summary. + * + * @return the summary value + */ + public String summary() { + return this.summary; + } + + /** + * Set inMage Event Summary. + * + * @param summary the summary value to set + * @return the InMageAzureV2EventDetails object itself. + */ + public InMageAzureV2EventDetails withSummary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get vMware Site name. + * + * @return the siteName value + */ + public String siteName() { + return this.siteName; + } + + /** + * Set vMware Site name. + * + * @param siteName the siteName value to set + * @return the InMageAzureV2EventDetails object itself. + */ + public InMageAzureV2EventDetails withSiteName(String siteName) { + this.siteName = siteName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2FailoverProviderInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2FailoverProviderInput.java new file mode 100644 index 0000000000000..1c95aa2ba292d --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2FailoverProviderInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * InMageAzureV2 provider specific input for failover. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMageAzureV2") +public class InMageAzureV2FailoverProviderInput extends ProviderSpecificFailoverInput { + /** + * Location of the vault. + */ + @JsonProperty(value = "vaultLocation") + private String vaultLocation; + + /** + * The recovery point id to be passed to failover to a particular recovery + * point. In case of latest recovery point, null should be passed. + */ + @JsonProperty(value = "recoveryPointId") + private String recoveryPointId; + + /** + * Get location of the vault. + * + * @return the vaultLocation value + */ + public String vaultLocation() { + return this.vaultLocation; + } + + /** + * Set location of the vault. + * + * @param vaultLocation the vaultLocation value to set + * @return the InMageAzureV2FailoverProviderInput object itself. + */ + public InMageAzureV2FailoverProviderInput withVaultLocation(String vaultLocation) { + this.vaultLocation = vaultLocation; + return this; + } + + /** + * Get the recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. + * + * @return the recoveryPointId value + */ + public String recoveryPointId() { + return this.recoveryPointId; + } + + /** + * Set the recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. + * + * @param recoveryPointId the recoveryPointId value to set + * @return the InMageAzureV2FailoverProviderInput object itself. + */ + public InMageAzureV2FailoverProviderInput withRecoveryPointId(String recoveryPointId) { + this.recoveryPointId = recoveryPointId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2PolicyDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2PolicyDetails.java new file mode 100644 index 0000000000000..451eae4772e27 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2PolicyDetails.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * InMage Azure v2 specific protection profile details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMageAzureV2") +public class InMageAzureV2PolicyDetails extends PolicyProviderSpecificDetails { + /** + * The crash consistent snapshot frequency in minutes. + */ + @JsonProperty(value = "crashConsistentFrequencyInMinutes") + private Integer crashConsistentFrequencyInMinutes; + + /** + * The recovery point threshold in minutes. + */ + @JsonProperty(value = "recoveryPointThresholdInMinutes") + private Integer recoveryPointThresholdInMinutes; + + /** + * The duration in minutes until which the recovery points need to be + * stored. + */ + @JsonProperty(value = "recoveryPointHistory") + private Integer recoveryPointHistory; + + /** + * The app consistent snapshot frequency in minutes. + */ + @JsonProperty(value = "appConsistentFrequencyInMinutes") + private Integer appConsistentFrequencyInMinutes; + + /** + * A value indicating whether multi-VM sync has to be enabled. + */ + @JsonProperty(value = "multiVmSyncStatus") + private String multiVmSyncStatus; + + /** + * Get the crash consistent snapshot frequency in minutes. + * + * @return the crashConsistentFrequencyInMinutes value + */ + public Integer crashConsistentFrequencyInMinutes() { + return this.crashConsistentFrequencyInMinutes; + } + + /** + * Set the crash consistent snapshot frequency in minutes. + * + * @param crashConsistentFrequencyInMinutes the crashConsistentFrequencyInMinutes value to set + * @return the InMageAzureV2PolicyDetails object itself. + */ + public InMageAzureV2PolicyDetails withCrashConsistentFrequencyInMinutes(Integer crashConsistentFrequencyInMinutes) { + this.crashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + return this; + } + + /** + * Get the recovery point threshold in minutes. + * + * @return the recoveryPointThresholdInMinutes value + */ + public Integer recoveryPointThresholdInMinutes() { + return this.recoveryPointThresholdInMinutes; + } + + /** + * Set the recovery point threshold in minutes. + * + * @param recoveryPointThresholdInMinutes the recoveryPointThresholdInMinutes value to set + * @return the InMageAzureV2PolicyDetails object itself. + */ + public InMageAzureV2PolicyDetails withRecoveryPointThresholdInMinutes(Integer recoveryPointThresholdInMinutes) { + this.recoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + return this; + } + + /** + * Get the duration in minutes until which the recovery points need to be stored. + * + * @return the recoveryPointHistory value + */ + public Integer recoveryPointHistory() { + return this.recoveryPointHistory; + } + + /** + * Set the duration in minutes until which the recovery points need to be stored. + * + * @param recoveryPointHistory the recoveryPointHistory value to set + * @return the InMageAzureV2PolicyDetails object itself. + */ + public InMageAzureV2PolicyDetails withRecoveryPointHistory(Integer recoveryPointHistory) { + this.recoveryPointHistory = recoveryPointHistory; + return this; + } + + /** + * Get the app consistent snapshot frequency in minutes. + * + * @return the appConsistentFrequencyInMinutes value + */ + public Integer appConsistentFrequencyInMinutes() { + return this.appConsistentFrequencyInMinutes; + } + + /** + * Set the app consistent snapshot frequency in minutes. + * + * @param appConsistentFrequencyInMinutes the appConsistentFrequencyInMinutes value to set + * @return the InMageAzureV2PolicyDetails object itself. + */ + public InMageAzureV2PolicyDetails withAppConsistentFrequencyInMinutes(Integer appConsistentFrequencyInMinutes) { + this.appConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + return this; + } + + /** + * Get a value indicating whether multi-VM sync has to be enabled. + * + * @return the multiVmSyncStatus value + */ + public String multiVmSyncStatus() { + return this.multiVmSyncStatus; + } + + /** + * Set a value indicating whether multi-VM sync has to be enabled. + * + * @param multiVmSyncStatus the multiVmSyncStatus value to set + * @return the InMageAzureV2PolicyDetails object itself. + */ + public InMageAzureV2PolicyDetails withMultiVmSyncStatus(String multiVmSyncStatus) { + this.multiVmSyncStatus = multiVmSyncStatus; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2PolicyInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2PolicyInput.java new file mode 100644 index 0000000000000..2733bbc6322e6 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2PolicyInput.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * VMWare Azure specific protection profile Input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMageAzureV2") +public class InMageAzureV2PolicyInput extends PolicyProviderSpecificInput { + /** + * The recovery point threshold in minutes. + */ + @JsonProperty(value = "recoveryPointThresholdInMinutes") + private Integer recoveryPointThresholdInMinutes; + + /** + * The duration in minutes until which the recovery points need to be + * stored. + */ + @JsonProperty(value = "recoveryPointHistory") + private Integer recoveryPointHistory; + + /** + * The crash consistent snapshot frequency (in minutes). + */ + @JsonProperty(value = "crashConsistentFrequencyInMinutes") + private Integer crashConsistentFrequencyInMinutes; + + /** + * The app consistent snapshot frequency (in minutes). + */ + @JsonProperty(value = "appConsistentFrequencyInMinutes") + private Integer appConsistentFrequencyInMinutes; + + /** + * A value indicating whether multi-VM sync has to be enabled. Value should + * be 'Enabled' or 'Disabled'. Possible values include: 'Enable', + * 'Disable'. + */ + @JsonProperty(value = "multiVmSyncStatus", required = true) + private SetMultiVmSyncStatus multiVmSyncStatus; + + /** + * Get the recovery point threshold in minutes. + * + * @return the recoveryPointThresholdInMinutes value + */ + public Integer recoveryPointThresholdInMinutes() { + return this.recoveryPointThresholdInMinutes; + } + + /** + * Set the recovery point threshold in minutes. + * + * @param recoveryPointThresholdInMinutes the recoveryPointThresholdInMinutes value to set + * @return the InMageAzureV2PolicyInput object itself. + */ + public InMageAzureV2PolicyInput withRecoveryPointThresholdInMinutes(Integer recoveryPointThresholdInMinutes) { + this.recoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + return this; + } + + /** + * Get the duration in minutes until which the recovery points need to be stored. + * + * @return the recoveryPointHistory value + */ + public Integer recoveryPointHistory() { + return this.recoveryPointHistory; + } + + /** + * Set the duration in minutes until which the recovery points need to be stored. + * + * @param recoveryPointHistory the recoveryPointHistory value to set + * @return the InMageAzureV2PolicyInput object itself. + */ + public InMageAzureV2PolicyInput withRecoveryPointHistory(Integer recoveryPointHistory) { + this.recoveryPointHistory = recoveryPointHistory; + return this; + } + + /** + * Get the crash consistent snapshot frequency (in minutes). + * + * @return the crashConsistentFrequencyInMinutes value + */ + public Integer crashConsistentFrequencyInMinutes() { + return this.crashConsistentFrequencyInMinutes; + } + + /** + * Set the crash consistent snapshot frequency (in minutes). + * + * @param crashConsistentFrequencyInMinutes the crashConsistentFrequencyInMinutes value to set + * @return the InMageAzureV2PolicyInput object itself. + */ + public InMageAzureV2PolicyInput withCrashConsistentFrequencyInMinutes(Integer crashConsistentFrequencyInMinutes) { + this.crashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + return this; + } + + /** + * Get the app consistent snapshot frequency (in minutes). + * + * @return the appConsistentFrequencyInMinutes value + */ + public Integer appConsistentFrequencyInMinutes() { + return this.appConsistentFrequencyInMinutes; + } + + /** + * Set the app consistent snapshot frequency (in minutes). + * + * @param appConsistentFrequencyInMinutes the appConsistentFrequencyInMinutes value to set + * @return the InMageAzureV2PolicyInput object itself. + */ + public InMageAzureV2PolicyInput withAppConsistentFrequencyInMinutes(Integer appConsistentFrequencyInMinutes) { + this.appConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + return this; + } + + /** + * Get a value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable'. + * + * @return the multiVmSyncStatus value + */ + public SetMultiVmSyncStatus multiVmSyncStatus() { + return this.multiVmSyncStatus; + } + + /** + * Set a value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable'. + * + * @param multiVmSyncStatus the multiVmSyncStatus value to set + * @return the InMageAzureV2PolicyInput object itself. + */ + public InMageAzureV2PolicyInput withMultiVmSyncStatus(SetMultiVmSyncStatus multiVmSyncStatus) { + this.multiVmSyncStatus = multiVmSyncStatus; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2ProtectedDiskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2ProtectedDiskDetails.java new file mode 100644 index 0000000000000..f8d77bf15c0c8 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2ProtectedDiskDetails.java @@ -0,0 +1,408 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * InMageAzureV2 protected disk details. + */ +public class InMageAzureV2ProtectedDiskDetails { + /** + * The disk id. + */ + @JsonProperty(value = "diskId") + private String diskId; + + /** + * The disk name. + */ + @JsonProperty(value = "diskName") + private String diskName; + + /** + * The protection stage. + */ + @JsonProperty(value = "protectionStage") + private String protectionStage; + + /** + * The health error code for the disk. + */ + @JsonProperty(value = "healthErrorCode") + private String healthErrorCode; + + /** + * The RPO in seconds. + */ + @JsonProperty(value = "rpoInSeconds") + private Long rpoInSeconds; + + /** + * A value indicating whether resync is required for this disk. + */ + @JsonProperty(value = "resyncRequired") + private String resyncRequired; + + /** + * The resync progress percentage. + */ + @JsonProperty(value = "resyncProgressPercentage") + private Integer resyncProgressPercentage; + + /** + * The resync duration in seconds. + */ + @JsonProperty(value = "resyncDurationInSeconds") + private Long resyncDurationInSeconds; + + /** + * The disk capacity in bytes. + */ + @JsonProperty(value = "diskCapacityInBytes") + private Long diskCapacityInBytes; + + /** + * The disk file system capacity in bytes. + */ + @JsonProperty(value = "fileSystemCapacityInBytes") + private Long fileSystemCapacityInBytes; + + /** + * The source data transit in MB. + */ + @JsonProperty(value = "sourceDataInMegaBytes") + private Double sourceDataInMegaBytes; + + /** + * The PS data transit in MB. + */ + @JsonProperty(value = "psDataInMegaBytes") + private Double psDataInMegaBytes; + + /** + * The target data transit in MB. + */ + @JsonProperty(value = "targetDataInMegaBytes") + private Double targetDataInMegaBytes; + + /** + * A value indicating whether disk is resized. + */ + @JsonProperty(value = "diskResized") + private String diskResized; + + /** + * The last RPO calculated time. + */ + @JsonProperty(value = "lastRpoCalculatedTime") + private DateTime lastRpoCalculatedTime; + + /** + * Get the disk id. + * + * @return the diskId value + */ + public String diskId() { + return this.diskId; + } + + /** + * Set the disk id. + * + * @param diskId the diskId value to set + * @return the InMageAzureV2ProtectedDiskDetails object itself. + */ + public InMageAzureV2ProtectedDiskDetails withDiskId(String diskId) { + this.diskId = diskId; + return this; + } + + /** + * Get the disk name. + * + * @return the diskName value + */ + public String diskName() { + return this.diskName; + } + + /** + * Set the disk name. + * + * @param diskName the diskName value to set + * @return the InMageAzureV2ProtectedDiskDetails object itself. + */ + public InMageAzureV2ProtectedDiskDetails withDiskName(String diskName) { + this.diskName = diskName; + return this; + } + + /** + * Get the protection stage. + * + * @return the protectionStage value + */ + public String protectionStage() { + return this.protectionStage; + } + + /** + * Set the protection stage. + * + * @param protectionStage the protectionStage value to set + * @return the InMageAzureV2ProtectedDiskDetails object itself. + */ + public InMageAzureV2ProtectedDiskDetails withProtectionStage(String protectionStage) { + this.protectionStage = protectionStage; + return this; + } + + /** + * Get the health error code for the disk. + * + * @return the healthErrorCode value + */ + public String healthErrorCode() { + return this.healthErrorCode; + } + + /** + * Set the health error code for the disk. + * + * @param healthErrorCode the healthErrorCode value to set + * @return the InMageAzureV2ProtectedDiskDetails object itself. + */ + public InMageAzureV2ProtectedDiskDetails withHealthErrorCode(String healthErrorCode) { + this.healthErrorCode = healthErrorCode; + return this; + } + + /** + * Get the RPO in seconds. + * + * @return the rpoInSeconds value + */ + public Long rpoInSeconds() { + return this.rpoInSeconds; + } + + /** + * Set the RPO in seconds. + * + * @param rpoInSeconds the rpoInSeconds value to set + * @return the InMageAzureV2ProtectedDiskDetails object itself. + */ + public InMageAzureV2ProtectedDiskDetails withRpoInSeconds(Long rpoInSeconds) { + this.rpoInSeconds = rpoInSeconds; + return this; + } + + /** + * Get a value indicating whether resync is required for this disk. + * + * @return the resyncRequired value + */ + public String resyncRequired() { + return this.resyncRequired; + } + + /** + * Set a value indicating whether resync is required for this disk. + * + * @param resyncRequired the resyncRequired value to set + * @return the InMageAzureV2ProtectedDiskDetails object itself. + */ + public InMageAzureV2ProtectedDiskDetails withResyncRequired(String resyncRequired) { + this.resyncRequired = resyncRequired; + return this; + } + + /** + * Get the resync progress percentage. + * + * @return the resyncProgressPercentage value + */ + public Integer resyncProgressPercentage() { + return this.resyncProgressPercentage; + } + + /** + * Set the resync progress percentage. + * + * @param resyncProgressPercentage the resyncProgressPercentage value to set + * @return the InMageAzureV2ProtectedDiskDetails object itself. + */ + public InMageAzureV2ProtectedDiskDetails withResyncProgressPercentage(Integer resyncProgressPercentage) { + this.resyncProgressPercentage = resyncProgressPercentage; + return this; + } + + /** + * Get the resync duration in seconds. + * + * @return the resyncDurationInSeconds value + */ + public Long resyncDurationInSeconds() { + return this.resyncDurationInSeconds; + } + + /** + * Set the resync duration in seconds. + * + * @param resyncDurationInSeconds the resyncDurationInSeconds value to set + * @return the InMageAzureV2ProtectedDiskDetails object itself. + */ + public InMageAzureV2ProtectedDiskDetails withResyncDurationInSeconds(Long resyncDurationInSeconds) { + this.resyncDurationInSeconds = resyncDurationInSeconds; + return this; + } + + /** + * Get the disk capacity in bytes. + * + * @return the diskCapacityInBytes value + */ + public Long diskCapacityInBytes() { + return this.diskCapacityInBytes; + } + + /** + * Set the disk capacity in bytes. + * + * @param diskCapacityInBytes the diskCapacityInBytes value to set + * @return the InMageAzureV2ProtectedDiskDetails object itself. + */ + public InMageAzureV2ProtectedDiskDetails withDiskCapacityInBytes(Long diskCapacityInBytes) { + this.diskCapacityInBytes = diskCapacityInBytes; + return this; + } + + /** + * Get the disk file system capacity in bytes. + * + * @return the fileSystemCapacityInBytes value + */ + public Long fileSystemCapacityInBytes() { + return this.fileSystemCapacityInBytes; + } + + /** + * Set the disk file system capacity in bytes. + * + * @param fileSystemCapacityInBytes the fileSystemCapacityInBytes value to set + * @return the InMageAzureV2ProtectedDiskDetails object itself. + */ + public InMageAzureV2ProtectedDiskDetails withFileSystemCapacityInBytes(Long fileSystemCapacityInBytes) { + this.fileSystemCapacityInBytes = fileSystemCapacityInBytes; + return this; + } + + /** + * Get the source data transit in MB. + * + * @return the sourceDataInMegaBytes value + */ + public Double sourceDataInMegaBytes() { + return this.sourceDataInMegaBytes; + } + + /** + * Set the source data transit in MB. + * + * @param sourceDataInMegaBytes the sourceDataInMegaBytes value to set + * @return the InMageAzureV2ProtectedDiskDetails object itself. + */ + public InMageAzureV2ProtectedDiskDetails withSourceDataInMegaBytes(Double sourceDataInMegaBytes) { + this.sourceDataInMegaBytes = sourceDataInMegaBytes; + return this; + } + + /** + * Get the PS data transit in MB. + * + * @return the psDataInMegaBytes value + */ + public Double psDataInMegaBytes() { + return this.psDataInMegaBytes; + } + + /** + * Set the PS data transit in MB. + * + * @param psDataInMegaBytes the psDataInMegaBytes value to set + * @return the InMageAzureV2ProtectedDiskDetails object itself. + */ + public InMageAzureV2ProtectedDiskDetails withPsDataInMegaBytes(Double psDataInMegaBytes) { + this.psDataInMegaBytes = psDataInMegaBytes; + return this; + } + + /** + * Get the target data transit in MB. + * + * @return the targetDataInMegaBytes value + */ + public Double targetDataInMegaBytes() { + return this.targetDataInMegaBytes; + } + + /** + * Set the target data transit in MB. + * + * @param targetDataInMegaBytes the targetDataInMegaBytes value to set + * @return the InMageAzureV2ProtectedDiskDetails object itself. + */ + public InMageAzureV2ProtectedDiskDetails withTargetDataInMegaBytes(Double targetDataInMegaBytes) { + this.targetDataInMegaBytes = targetDataInMegaBytes; + return this; + } + + /** + * Get a value indicating whether disk is resized. + * + * @return the diskResized value + */ + public String diskResized() { + return this.diskResized; + } + + /** + * Set a value indicating whether disk is resized. + * + * @param diskResized the diskResized value to set + * @return the InMageAzureV2ProtectedDiskDetails object itself. + */ + public InMageAzureV2ProtectedDiskDetails withDiskResized(String diskResized) { + this.diskResized = diskResized; + return this; + } + + /** + * Get the last RPO calculated time. + * + * @return the lastRpoCalculatedTime value + */ + public DateTime lastRpoCalculatedTime() { + return this.lastRpoCalculatedTime; + } + + /** + * Set the last RPO calculated time. + * + * @param lastRpoCalculatedTime the lastRpoCalculatedTime value to set + * @return the InMageAzureV2ProtectedDiskDetails object itself. + */ + public InMageAzureV2ProtectedDiskDetails withLastRpoCalculatedTime(DateTime lastRpoCalculatedTime) { + this.lastRpoCalculatedTime = lastRpoCalculatedTime; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2RecoveryPointDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2RecoveryPointDetails.java new file mode 100644 index 0000000000000..3fbf3e9368ba1 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2RecoveryPointDetails.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * InMage Azure V2 provider specific recovery point details. + */ +public class InMageAzureV2RecoveryPointDetails extends ProviderSpecificRecoveryPointDetails { + /** + * Gets the instance type. + */ + @JsonProperty(value = "instanceType", access = JsonProperty.Access.WRITE_ONLY) + private String instanceType; + + /** + * A value indicating whether the recovery point is multi VM consistent. + */ + @JsonProperty(value = "isMultiVmSyncPoint") + private String isMultiVmSyncPoint; + + /** + * Get gets the instance type. + * + * @return the instanceType value + */ + public String instanceType() { + return this.instanceType; + } + + /** + * Get a value indicating whether the recovery point is multi VM consistent. + * + * @return the isMultiVmSyncPoint value + */ + public String isMultiVmSyncPoint() { + return this.isMultiVmSyncPoint; + } + + /** + * Set a value indicating whether the recovery point is multi VM consistent. + * + * @param isMultiVmSyncPoint the isMultiVmSyncPoint value to set + * @return the InMageAzureV2RecoveryPointDetails object itself. + */ + public InMageAzureV2RecoveryPointDetails withIsMultiVmSyncPoint(String isMultiVmSyncPoint) { + this.isMultiVmSyncPoint = isMultiVmSyncPoint; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2ReplicationDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2ReplicationDetails.java new file mode 100644 index 0000000000000..33090a0adcc7f --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2ReplicationDetails.java @@ -0,0 +1,1254 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * InMageAzureV2 provider specific settings. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMageAzureV2") +public class InMageAzureV2ReplicationDetails extends ReplicationProviderSpecificSettings { + /** + * The infrastructure VM Id. + */ + @JsonProperty(value = "infrastructureVmId") + private String infrastructureVmId; + + /** + * The vCenter infrastructure Id. + */ + @JsonProperty(value = "vCenterInfrastructureId") + private String vCenterInfrastructureId; + + /** + * The protection stage. + */ + @JsonProperty(value = "protectionStage") + private String protectionStage; + + /** + * The virtual machine Id. + */ + @JsonProperty(value = "vmId") + private String vmId; + + /** + * The protection state for the vm. + */ + @JsonProperty(value = "vmProtectionState") + private String vmProtectionState; + + /** + * The protection state description for the vm. + */ + @JsonProperty(value = "vmProtectionStateDescription") + private String vmProtectionStateDescription; + + /** + * The resync progress percentage. + */ + @JsonProperty(value = "resyncProgressPercentage") + private Integer resyncProgressPercentage; + + /** + * The RPO in seconds. + */ + @JsonProperty(value = "rpoInSeconds") + private Long rpoInSeconds; + + /** + * The compressed data change rate in MB. + */ + @JsonProperty(value = "compressedDataRateInMB") + private Double compressedDataRateInMB; + + /** + * The uncompressed data change rate in MB. + */ + @JsonProperty(value = "uncompressedDataRateInMB") + private Double uncompressedDataRateInMB; + + /** + * The source IP address. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * The agent version. + */ + @JsonProperty(value = "agentVersion") + private String agentVersion; + + /** + * A value indicating whether installed agent needs to be updated. + */ + @JsonProperty(value = "isAgentUpdateRequired") + private String isAgentUpdateRequired; + + /** + * A value indicating whether the source server requires a restart after + * update. + */ + @JsonProperty(value = "isRebootAfterUpdateRequired") + private String isRebootAfterUpdateRequired; + + /** + * The last heartbeat received from the source server. + */ + @JsonProperty(value = "lastHeartbeat") + private DateTime lastHeartbeat; + + /** + * The process server Id. + */ + @JsonProperty(value = "processServerId") + private String processServerId; + + /** + * The multi vm group Id. + */ + @JsonProperty(value = "multiVmGroupId") + private String multiVmGroupId; + + /** + * The multi vm group name. + */ + @JsonProperty(value = "multiVmGroupName") + private String multiVmGroupName; + + /** + * A value indicating whether multi vm sync is enabled or disabled. + */ + @JsonProperty(value = "multiVmSyncStatus") + private String multiVmSyncStatus; + + /** + * The list of protected disks. + */ + @JsonProperty(value = "protectedDisks") + private List protectedDisks; + + /** + * A value indicating whether any disk is resized for this VM. + */ + @JsonProperty(value = "diskResized") + private String diskResized; + + /** + * The master target Id. + */ + @JsonProperty(value = "masterTargetId") + private String masterTargetId; + + /** + * The CPU count of the VM on the primary side. + */ + @JsonProperty(value = "sourceVmCPUCount") + private Integer sourceVmCPUCount; + + /** + * The RAM size of the VM on the primary side. + */ + @JsonProperty(value = "sourceVmRAMSizeInMB") + private Integer sourceVmRAMSizeInMB; + + /** + * The type of the OS on the VM. + */ + @JsonProperty(value = "osType") + private String osType; + + /** + * The OS disk VHD name. + */ + @JsonProperty(value = "vhdName") + private String vhdName; + + /** + * The id of the disk containing the OS. + */ + @JsonProperty(value = "osDiskId") + private String osDiskId; + + /** + * Azure VM Disk details. + */ + @JsonProperty(value = "azureVMDiskDetails") + private List azureVMDiskDetails; + + /** + * Recovery Azure given name. + */ + @JsonProperty(value = "recoveryAzureVMName") + private String recoveryAzureVMName; + + /** + * The Recovery Azure VM size. + */ + @JsonProperty(value = "recoveryAzureVMSize") + private String recoveryAzureVMSize; + + /** + * The recovery Azure storage account. + */ + @JsonProperty(value = "recoveryAzureStorageAccount") + private String recoveryAzureStorageAccount; + + /** + * The ARM id of the log storage account used for replication. This will be + * set to null if no log storage account was provided during enable + * protection. + */ + @JsonProperty(value = "recoveryAzureLogStorageAccountId") + private String recoveryAzureLogStorageAccountId; + + /** + * The PE Network details. + */ + @JsonProperty(value = "vmNics") + private List vmNics; + + /** + * The selected recovery azure network Id. + */ + @JsonProperty(value = "selectedRecoveryAzureNetworkId") + private String selectedRecoveryAzureNetworkId; + + /** + * A value indicating the discovery type of the machine. Value can be + * vCenter or physical. + */ + @JsonProperty(value = "discoveryType") + private String discoveryType; + + /** + * The selected option to enable RDP\SSH on target vm after failover. + * String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + */ + @JsonProperty(value = "enableRDPOnTargetOption") + private String enableRDPOnTargetOption; + + /** + * The datastores of the on-premise machine. Value can be list of strings + * that contain datastore names. + */ + @JsonProperty(value = "datastores") + private List datastores; + + /** + * The ARM Id of the target Azure VM. This value will be null until the VM + * is failed over. Only after failure it will be populated with the ARM Id + * of the Azure VM. + */ + @JsonProperty(value = "targetVmId") + private String targetVmId; + + /** + * The target resource group Id. + */ + @JsonProperty(value = "recoveryAzureResourceGroupId") + private String recoveryAzureResourceGroupId; + + /** + * The recovery availability set Id. + */ + @JsonProperty(value = "recoveryAvailabilitySetId") + private String recoveryAvailabilitySetId; + + /** + * A value indicating whether managed disks should be used during failover. + */ + @JsonProperty(value = "useManagedDisks") + private String useManagedDisks; + + /** + * License Type of the VM to be used. + */ + @JsonProperty(value = "licenseType") + private String licenseType; + + /** + * The validation errors of the on-premise machine Value can be list of + * validation errors. + */ + @JsonProperty(value = "validationErrors") + private List validationErrors; + + /** + * The last RPO calculated time. + */ + @JsonProperty(value = "lastRpoCalculatedTime") + private DateTime lastRpoCalculatedTime; + + /** + * The last update time received from on-prem components. + */ + @JsonProperty(value = "lastUpdateReceivedTime") + private DateTime lastUpdateReceivedTime; + + /** + * The replica id of the protected item. + */ + @JsonProperty(value = "replicaId") + private String replicaId; + + /** + * The OS Version of the protected item. + */ + @JsonProperty(value = "osVersion") + private String osVersion; + + /** + * Get the infrastructure VM Id. + * + * @return the infrastructureVmId value + */ + public String infrastructureVmId() { + return this.infrastructureVmId; + } + + /** + * Set the infrastructure VM Id. + * + * @param infrastructureVmId the infrastructureVmId value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withInfrastructureVmId(String infrastructureVmId) { + this.infrastructureVmId = infrastructureVmId; + return this; + } + + /** + * Get the vCenter infrastructure Id. + * + * @return the vCenterInfrastructureId value + */ + public String vCenterInfrastructureId() { + return this.vCenterInfrastructureId; + } + + /** + * Set the vCenter infrastructure Id. + * + * @param vCenterInfrastructureId the vCenterInfrastructureId value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withVCenterInfrastructureId(String vCenterInfrastructureId) { + this.vCenterInfrastructureId = vCenterInfrastructureId; + return this; + } + + /** + * Get the protection stage. + * + * @return the protectionStage value + */ + public String protectionStage() { + return this.protectionStage; + } + + /** + * Set the protection stage. + * + * @param protectionStage the protectionStage value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withProtectionStage(String protectionStage) { + this.protectionStage = protectionStage; + return this; + } + + /** + * Get the virtual machine Id. + * + * @return the vmId value + */ + public String vmId() { + return this.vmId; + } + + /** + * Set the virtual machine Id. + * + * @param vmId the vmId value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withVmId(String vmId) { + this.vmId = vmId; + return this; + } + + /** + * Get the protection state for the vm. + * + * @return the vmProtectionState value + */ + public String vmProtectionState() { + return this.vmProtectionState; + } + + /** + * Set the protection state for the vm. + * + * @param vmProtectionState the vmProtectionState value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withVmProtectionState(String vmProtectionState) { + this.vmProtectionState = vmProtectionState; + return this; + } + + /** + * Get the protection state description for the vm. + * + * @return the vmProtectionStateDescription value + */ + public String vmProtectionStateDescription() { + return this.vmProtectionStateDescription; + } + + /** + * Set the protection state description for the vm. + * + * @param vmProtectionStateDescription the vmProtectionStateDescription value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withVmProtectionStateDescription(String vmProtectionStateDescription) { + this.vmProtectionStateDescription = vmProtectionStateDescription; + return this; + } + + /** + * Get the resync progress percentage. + * + * @return the resyncProgressPercentage value + */ + public Integer resyncProgressPercentage() { + return this.resyncProgressPercentage; + } + + /** + * Set the resync progress percentage. + * + * @param resyncProgressPercentage the resyncProgressPercentage value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withResyncProgressPercentage(Integer resyncProgressPercentage) { + this.resyncProgressPercentage = resyncProgressPercentage; + return this; + } + + /** + * Get the RPO in seconds. + * + * @return the rpoInSeconds value + */ + public Long rpoInSeconds() { + return this.rpoInSeconds; + } + + /** + * Set the RPO in seconds. + * + * @param rpoInSeconds the rpoInSeconds value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withRpoInSeconds(Long rpoInSeconds) { + this.rpoInSeconds = rpoInSeconds; + return this; + } + + /** + * Get the compressed data change rate in MB. + * + * @return the compressedDataRateInMB value + */ + public Double compressedDataRateInMB() { + return this.compressedDataRateInMB; + } + + /** + * Set the compressed data change rate in MB. + * + * @param compressedDataRateInMB the compressedDataRateInMB value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withCompressedDataRateInMB(Double compressedDataRateInMB) { + this.compressedDataRateInMB = compressedDataRateInMB; + return this; + } + + /** + * Get the uncompressed data change rate in MB. + * + * @return the uncompressedDataRateInMB value + */ + public Double uncompressedDataRateInMB() { + return this.uncompressedDataRateInMB; + } + + /** + * Set the uncompressed data change rate in MB. + * + * @param uncompressedDataRateInMB the uncompressedDataRateInMB value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withUncompressedDataRateInMB(Double uncompressedDataRateInMB) { + this.uncompressedDataRateInMB = uncompressedDataRateInMB; + return this; + } + + /** + * Get the source IP address. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the source IP address. + * + * @param ipAddress the ipAddress value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + 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 InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withAgentVersion(String agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + /** + * Get a value indicating whether installed agent needs to be updated. + * + * @return the isAgentUpdateRequired value + */ + public String isAgentUpdateRequired() { + return this.isAgentUpdateRequired; + } + + /** + * Set a value indicating whether installed agent needs to be updated. + * + * @param isAgentUpdateRequired the isAgentUpdateRequired value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withIsAgentUpdateRequired(String isAgentUpdateRequired) { + this.isAgentUpdateRequired = isAgentUpdateRequired; + return this; + } + + /** + * Get a value indicating whether the source server requires a restart after update. + * + * @return the isRebootAfterUpdateRequired value + */ + public String isRebootAfterUpdateRequired() { + return this.isRebootAfterUpdateRequired; + } + + /** + * Set a value indicating whether the source server requires a restart after update. + * + * @param isRebootAfterUpdateRequired the isRebootAfterUpdateRequired value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withIsRebootAfterUpdateRequired(String isRebootAfterUpdateRequired) { + this.isRebootAfterUpdateRequired = isRebootAfterUpdateRequired; + return this; + } + + /** + * Get the last heartbeat received from the source server. + * + * @return the lastHeartbeat value + */ + public DateTime lastHeartbeat() { + return this.lastHeartbeat; + } + + /** + * Set the last heartbeat received from the source server. + * + * @param lastHeartbeat the lastHeartbeat value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withLastHeartbeat(DateTime lastHeartbeat) { + this.lastHeartbeat = lastHeartbeat; + return this; + } + + /** + * Get the process server Id. + * + * @return the processServerId value + */ + public String processServerId() { + return this.processServerId; + } + + /** + * Set the process server Id. + * + * @param processServerId the processServerId value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withProcessServerId(String processServerId) { + this.processServerId = processServerId; + return this; + } + + /** + * Get the multi vm group Id. + * + * @return the multiVmGroupId value + */ + public String multiVmGroupId() { + return this.multiVmGroupId; + } + + /** + * Set the multi vm group Id. + * + * @param multiVmGroupId the multiVmGroupId value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withMultiVmGroupId(String multiVmGroupId) { + this.multiVmGroupId = multiVmGroupId; + return this; + } + + /** + * Get the multi vm group name. + * + * @return the multiVmGroupName value + */ + public String multiVmGroupName() { + return this.multiVmGroupName; + } + + /** + * Set the multi vm group name. + * + * @param multiVmGroupName the multiVmGroupName value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withMultiVmGroupName(String multiVmGroupName) { + this.multiVmGroupName = multiVmGroupName; + return this; + } + + /** + * Get a value indicating whether multi vm sync is enabled or disabled. + * + * @return the multiVmSyncStatus value + */ + public String multiVmSyncStatus() { + return this.multiVmSyncStatus; + } + + /** + * Set a value indicating whether multi vm sync is enabled or disabled. + * + * @param multiVmSyncStatus the multiVmSyncStatus value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withMultiVmSyncStatus(String multiVmSyncStatus) { + this.multiVmSyncStatus = multiVmSyncStatus; + return this; + } + + /** + * Get the list of protected disks. + * + * @return the protectedDisks value + */ + public List protectedDisks() { + return this.protectedDisks; + } + + /** + * Set the list of protected disks. + * + * @param protectedDisks the protectedDisks value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withProtectedDisks(List protectedDisks) { + this.protectedDisks = protectedDisks; + return this; + } + + /** + * Get a value indicating whether any disk is resized for this VM. + * + * @return the diskResized value + */ + public String diskResized() { + return this.diskResized; + } + + /** + * Set a value indicating whether any disk is resized for this VM. + * + * @param diskResized the diskResized value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withDiskResized(String diskResized) { + this.diskResized = diskResized; + return this; + } + + /** + * Get the master target Id. + * + * @return the masterTargetId value + */ + public String masterTargetId() { + return this.masterTargetId; + } + + /** + * Set the master target Id. + * + * @param masterTargetId the masterTargetId value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withMasterTargetId(String masterTargetId) { + this.masterTargetId = masterTargetId; + return this; + } + + /** + * Get the CPU count of the VM on the primary side. + * + * @return the sourceVmCPUCount value + */ + public Integer sourceVmCPUCount() { + return this.sourceVmCPUCount; + } + + /** + * Set the CPU count of the VM on the primary side. + * + * @param sourceVmCPUCount the sourceVmCPUCount value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withSourceVmCPUCount(Integer sourceVmCPUCount) { + this.sourceVmCPUCount = sourceVmCPUCount; + return this; + } + + /** + * Get the RAM size of the VM on the primary side. + * + * @return the sourceVmRAMSizeInMB value + */ + public Integer sourceVmRAMSizeInMB() { + return this.sourceVmRAMSizeInMB; + } + + /** + * Set the RAM size of the VM on the primary side. + * + * @param sourceVmRAMSizeInMB the sourceVmRAMSizeInMB value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withSourceVmRAMSizeInMB(Integer sourceVmRAMSizeInMB) { + this.sourceVmRAMSizeInMB = sourceVmRAMSizeInMB; + return this; + } + + /** + * Get the type of the OS on the VM. + * + * @return the osType value + */ + public String osType() { + return this.osType; + } + + /** + * Set the type of the OS on the VM. + * + * @param osType the osType value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withOsType(String osType) { + this.osType = osType; + return this; + } + + /** + * Get the OS disk VHD name. + * + * @return the vhdName value + */ + public String vhdName() { + return this.vhdName; + } + + /** + * Set the OS disk VHD name. + * + * @param vhdName the vhdName value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withVhdName(String vhdName) { + this.vhdName = vhdName; + return this; + } + + /** + * Get the id of the disk containing the OS. + * + * @return the osDiskId value + */ + public String osDiskId() { + return this.osDiskId; + } + + /** + * Set the id of the disk containing the OS. + * + * @param osDiskId the osDiskId value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withOsDiskId(String osDiskId) { + this.osDiskId = osDiskId; + return this; + } + + /** + * Get azure VM Disk details. + * + * @return the azureVMDiskDetails value + */ + public List azureVMDiskDetails() { + return this.azureVMDiskDetails; + } + + /** + * Set azure VM Disk details. + * + * @param azureVMDiskDetails the azureVMDiskDetails value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withAzureVMDiskDetails(List azureVMDiskDetails) { + this.azureVMDiskDetails = azureVMDiskDetails; + return this; + } + + /** + * Get recovery Azure given name. + * + * @return the recoveryAzureVMName value + */ + public String recoveryAzureVMName() { + return this.recoveryAzureVMName; + } + + /** + * Set recovery Azure given name. + * + * @param recoveryAzureVMName the recoveryAzureVMName value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withRecoveryAzureVMName(String recoveryAzureVMName) { + this.recoveryAzureVMName = recoveryAzureVMName; + return this; + } + + /** + * Get the Recovery Azure VM size. + * + * @return the recoveryAzureVMSize value + */ + public String recoveryAzureVMSize() { + return this.recoveryAzureVMSize; + } + + /** + * Set the Recovery Azure VM size. + * + * @param recoveryAzureVMSize the recoveryAzureVMSize value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withRecoveryAzureVMSize(String recoveryAzureVMSize) { + this.recoveryAzureVMSize = recoveryAzureVMSize; + return this; + } + + /** + * Get the recovery Azure storage account. + * + * @return the recoveryAzureStorageAccount value + */ + public String recoveryAzureStorageAccount() { + return this.recoveryAzureStorageAccount; + } + + /** + * Set the recovery Azure storage account. + * + * @param recoveryAzureStorageAccount the recoveryAzureStorageAccount value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withRecoveryAzureStorageAccount(String recoveryAzureStorageAccount) { + this.recoveryAzureStorageAccount = recoveryAzureStorageAccount; + return this; + } + + /** + * Get the ARM id of the log storage account used for replication. This will be set to null if no log storage account was provided during enable protection. + * + * @return the recoveryAzureLogStorageAccountId value + */ + public String recoveryAzureLogStorageAccountId() { + return this.recoveryAzureLogStorageAccountId; + } + + /** + * Set the ARM id of the log storage account used for replication. This will be set to null if no log storage account was provided during enable protection. + * + * @param recoveryAzureLogStorageAccountId the recoveryAzureLogStorageAccountId value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withRecoveryAzureLogStorageAccountId(String recoveryAzureLogStorageAccountId) { + this.recoveryAzureLogStorageAccountId = recoveryAzureLogStorageAccountId; + return this; + } + + /** + * Get the PE Network details. + * + * @return the vmNics value + */ + public List vmNics() { + return this.vmNics; + } + + /** + * Set the PE Network details. + * + * @param vmNics the vmNics value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withVmNics(List vmNics) { + this.vmNics = vmNics; + return this; + } + + /** + * Get the selected recovery azure network Id. + * + * @return the selectedRecoveryAzureNetworkId value + */ + public String selectedRecoveryAzureNetworkId() { + return this.selectedRecoveryAzureNetworkId; + } + + /** + * Set the selected recovery azure network Id. + * + * @param selectedRecoveryAzureNetworkId the selectedRecoveryAzureNetworkId value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withSelectedRecoveryAzureNetworkId(String selectedRecoveryAzureNetworkId) { + this.selectedRecoveryAzureNetworkId = selectedRecoveryAzureNetworkId; + return this; + } + + /** + * Get a value indicating the discovery type of the machine. Value can be vCenter or physical. + * + * @return the discoveryType value + */ + public String discoveryType() { + return this.discoveryType; + } + + /** + * Set a value indicating the discovery type of the machine. Value can be vCenter or physical. + * + * @param discoveryType the discoveryType value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withDiscoveryType(String discoveryType) { + this.discoveryType = discoveryType; + return this; + } + + /** + * Get the selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + * + * @return the enableRDPOnTargetOption value + */ + public String enableRDPOnTargetOption() { + return this.enableRDPOnTargetOption; + } + + /** + * Set the selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + * + * @param enableRDPOnTargetOption the enableRDPOnTargetOption value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withEnableRDPOnTargetOption(String enableRDPOnTargetOption) { + this.enableRDPOnTargetOption = enableRDPOnTargetOption; + return this; + } + + /** + * Get the datastores of the on-premise machine. Value can be list of strings that contain datastore names. + * + * @return the datastores value + */ + public List datastores() { + return this.datastores; + } + + /** + * Set the datastores of the on-premise machine. Value can be list of strings that contain datastore names. + * + * @param datastores the datastores value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withDatastores(List datastores) { + this.datastores = datastores; + return this; + } + + /** + * Get the ARM Id of the target Azure VM. This value will be null until the VM is failed over. Only after failure it will be populated with the ARM Id of the Azure VM. + * + * @return the targetVmId value + */ + public String targetVmId() { + return this.targetVmId; + } + + /** + * Set the ARM Id of the target Azure VM. This value will be null until the VM is failed over. Only after failure it will be populated with the ARM Id of the Azure VM. + * + * @param targetVmId the targetVmId value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withTargetVmId(String targetVmId) { + this.targetVmId = targetVmId; + return this; + } + + /** + * Get the target resource group Id. + * + * @return the recoveryAzureResourceGroupId value + */ + public String recoveryAzureResourceGroupId() { + return this.recoveryAzureResourceGroupId; + } + + /** + * Set the target resource group Id. + * + * @param recoveryAzureResourceGroupId the recoveryAzureResourceGroupId value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withRecoveryAzureResourceGroupId(String recoveryAzureResourceGroupId) { + this.recoveryAzureResourceGroupId = recoveryAzureResourceGroupId; + return this; + } + + /** + * Get the recovery availability set Id. + * + * @return the recoveryAvailabilitySetId value + */ + public String recoveryAvailabilitySetId() { + return this.recoveryAvailabilitySetId; + } + + /** + * Set the recovery availability set Id. + * + * @param recoveryAvailabilitySetId the recoveryAvailabilitySetId value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withRecoveryAvailabilitySetId(String recoveryAvailabilitySetId) { + this.recoveryAvailabilitySetId = recoveryAvailabilitySetId; + return this; + } + + /** + * Get a value indicating whether managed disks should be used during failover. + * + * @return the useManagedDisks value + */ + public String useManagedDisks() { + return this.useManagedDisks; + } + + /** + * Set a value indicating whether managed disks should be used during failover. + * + * @param useManagedDisks the useManagedDisks value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withUseManagedDisks(String useManagedDisks) { + this.useManagedDisks = useManagedDisks; + return this; + } + + /** + * Get license Type of the VM to be used. + * + * @return the licenseType value + */ + public String licenseType() { + return this.licenseType; + } + + /** + * Set license Type of the VM to be used. + * + * @param licenseType the licenseType value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withLicenseType(String licenseType) { + this.licenseType = licenseType; + return this; + } + + /** + * Get the validation errors of the on-premise machine Value can be list of validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + + /** + * Set the validation errors of the on-premise machine Value can be list of validation errors. + * + * @param validationErrors the validationErrors value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withValidationErrors(List validationErrors) { + this.validationErrors = validationErrors; + return this; + } + + /** + * Get the last RPO calculated time. + * + * @return the lastRpoCalculatedTime value + */ + public DateTime lastRpoCalculatedTime() { + return this.lastRpoCalculatedTime; + } + + /** + * Set the last RPO calculated time. + * + * @param lastRpoCalculatedTime the lastRpoCalculatedTime value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withLastRpoCalculatedTime(DateTime lastRpoCalculatedTime) { + this.lastRpoCalculatedTime = lastRpoCalculatedTime; + return this; + } + + /** + * Get the last update time received from on-prem components. + * + * @return the lastUpdateReceivedTime value + */ + public DateTime lastUpdateReceivedTime() { + return this.lastUpdateReceivedTime; + } + + /** + * Set the last update time received from on-prem components. + * + * @param lastUpdateReceivedTime the lastUpdateReceivedTime value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withLastUpdateReceivedTime(DateTime lastUpdateReceivedTime) { + this.lastUpdateReceivedTime = lastUpdateReceivedTime; + return this; + } + + /** + * Get the replica id of the protected item. + * + * @return the replicaId value + */ + public String replicaId() { + return this.replicaId; + } + + /** + * Set the replica id of the protected item. + * + * @param replicaId the replicaId value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withReplicaId(String replicaId) { + this.replicaId = replicaId; + return this; + } + + /** + * Get the OS Version of the protected item. + * + * @return the osVersion value + */ + public String osVersion() { + return this.osVersion; + } + + /** + * Set the OS Version of the protected item. + * + * @param osVersion the osVersion value to set + * @return the InMageAzureV2ReplicationDetails object itself. + */ + public InMageAzureV2ReplicationDetails withOsVersion(String osVersion) { + this.osVersion = osVersion; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2ReprotectInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2ReprotectInput.java new file mode 100644 index 0000000000000..7e6592292b10e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2ReprotectInput.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * InMageAzureV2 specific provider input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMageAzureV2") +public class InMageAzureV2ReprotectInput extends ReverseReplicationProviderSpecificInput { + /** + * The Master target Id. + */ + @JsonProperty(value = "masterTargetId") + private String masterTargetId; + + /** + * The Process Server Id. + */ + @JsonProperty(value = "processServerId") + private String processServerId; + + /** + * The storage account id. + */ + @JsonProperty(value = "storageAccountId") + private String storageAccountId; + + /** + * The CS account Id. + */ + @JsonProperty(value = "runAsAccountId") + private String runAsAccountId; + + /** + * The Policy Id. + */ + @JsonProperty(value = "policyId") + private String policyId; + + /** + * The storage account to be used for logging during replication. + */ + @JsonProperty(value = "logStorageAccountId") + private String logStorageAccountId; + + /** + * The disks to include list. + */ + @JsonProperty(value = "disksToInclude") + private List disksToInclude; + + /** + * Get the Master target Id. + * + * @return the masterTargetId value + */ + public String masterTargetId() { + return this.masterTargetId; + } + + /** + * Set the Master target Id. + * + * @param masterTargetId the masterTargetId value to set + * @return the InMageAzureV2ReprotectInput object itself. + */ + public InMageAzureV2ReprotectInput withMasterTargetId(String masterTargetId) { + this.masterTargetId = masterTargetId; + return this; + } + + /** + * Get the Process Server Id. + * + * @return the processServerId value + */ + public String processServerId() { + return this.processServerId; + } + + /** + * Set the Process Server Id. + * + * @param processServerId the processServerId value to set + * @return the InMageAzureV2ReprotectInput object itself. + */ + public InMageAzureV2ReprotectInput withProcessServerId(String processServerId) { + this.processServerId = processServerId; + return this; + } + + /** + * Get the storage account id. + * + * @return the storageAccountId value + */ + public String storageAccountId() { + return this.storageAccountId; + } + + /** + * Set the storage account id. + * + * @param storageAccountId the storageAccountId value to set + * @return the InMageAzureV2ReprotectInput object itself. + */ + public InMageAzureV2ReprotectInput withStorageAccountId(String storageAccountId) { + this.storageAccountId = storageAccountId; + return this; + } + + /** + * Get the CS account Id. + * + * @return the runAsAccountId value + */ + public String runAsAccountId() { + return this.runAsAccountId; + } + + /** + * Set the CS account Id. + * + * @param runAsAccountId the runAsAccountId value to set + * @return the InMageAzureV2ReprotectInput object itself. + */ + public InMageAzureV2ReprotectInput withRunAsAccountId(String runAsAccountId) { + this.runAsAccountId = runAsAccountId; + return this; + } + + /** + * Get the Policy Id. + * + * @return the policyId value + */ + public String policyId() { + return this.policyId; + } + + /** + * Set the Policy Id. + * + * @param policyId the policyId value to set + * @return the InMageAzureV2ReprotectInput object itself. + */ + public InMageAzureV2ReprotectInput withPolicyId(String policyId) { + this.policyId = policyId; + return this; + } + + /** + * Get the storage account to be used for logging during replication. + * + * @return the logStorageAccountId value + */ + public String logStorageAccountId() { + return this.logStorageAccountId; + } + + /** + * Set the storage account to be used for logging during replication. + * + * @param logStorageAccountId the logStorageAccountId value to set + * @return the InMageAzureV2ReprotectInput object itself. + */ + public InMageAzureV2ReprotectInput withLogStorageAccountId(String logStorageAccountId) { + this.logStorageAccountId = logStorageAccountId; + return this; + } + + /** + * Get the disks to include list. + * + * @return the disksToInclude value + */ + public List disksToInclude() { + return this.disksToInclude; + } + + /** + * Set the disks to include list. + * + * @param disksToInclude the disksToInclude value to set + * @return the InMageAzureV2ReprotectInput object itself. + */ + public InMageAzureV2ReprotectInput withDisksToInclude(List disksToInclude) { + this.disksToInclude = disksToInclude; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2UpdateReplicationProtectedItemInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2UpdateReplicationProtectedItemInput.java new file mode 100644 index 0000000000000..14eca33fce4b1 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageAzureV2UpdateReplicationProtectedItemInput.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * InMage Azure V2 input to update replication protected item. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMageAzureV2") +public class InMageAzureV2UpdateReplicationProtectedItemInput extends UpdateReplicationProtectedItemProviderInput { + /** + * The recovery Azure resource group Id for classic deployment. + */ + @JsonProperty(value = "recoveryAzureV1ResourceGroupId") + private String recoveryAzureV1ResourceGroupId; + + /** + * The recovery Azure resource group Id for resource manager deployment. + */ + @JsonProperty(value = "recoveryAzureV2ResourceGroupId") + private String recoveryAzureV2ResourceGroupId; + + /** + * A value indicating whether managed disks should be used during failover. + */ + @JsonProperty(value = "useManagedDisks") + private String useManagedDisks; + + /** + * Get the recovery Azure resource group Id for classic deployment. + * + * @return the recoveryAzureV1ResourceGroupId value + */ + public String recoveryAzureV1ResourceGroupId() { + return this.recoveryAzureV1ResourceGroupId; + } + + /** + * Set the recovery Azure resource group Id for classic deployment. + * + * @param recoveryAzureV1ResourceGroupId the recoveryAzureV1ResourceGroupId value to set + * @return the InMageAzureV2UpdateReplicationProtectedItemInput object itself. + */ + public InMageAzureV2UpdateReplicationProtectedItemInput withRecoveryAzureV1ResourceGroupId(String recoveryAzureV1ResourceGroupId) { + this.recoveryAzureV1ResourceGroupId = recoveryAzureV1ResourceGroupId; + return this; + } + + /** + * Get the recovery Azure resource group Id for resource manager deployment. + * + * @return the recoveryAzureV2ResourceGroupId value + */ + public String recoveryAzureV2ResourceGroupId() { + return this.recoveryAzureV2ResourceGroupId; + } + + /** + * Set the recovery Azure resource group Id for resource manager deployment. + * + * @param recoveryAzureV2ResourceGroupId the recoveryAzureV2ResourceGroupId value to set + * @return the InMageAzureV2UpdateReplicationProtectedItemInput object itself. + */ + public InMageAzureV2UpdateReplicationProtectedItemInput withRecoveryAzureV2ResourceGroupId(String recoveryAzureV2ResourceGroupId) { + this.recoveryAzureV2ResourceGroupId = recoveryAzureV2ResourceGroupId; + return this; + } + + /** + * Get a value indicating whether managed disks should be used during failover. + * + * @return the useManagedDisks value + */ + public String useManagedDisks() { + return this.useManagedDisks; + } + + /** + * Set a value indicating whether managed disks should be used during failover. + * + * @param useManagedDisks the useManagedDisks value to set + * @return the InMageAzureV2UpdateReplicationProtectedItemInput object itself. + */ + public InMageAzureV2UpdateReplicationProtectedItemInput withUseManagedDisks(String useManagedDisks) { + this.useManagedDisks = useManagedDisks; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageBasePolicyDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageBasePolicyDetails.java new file mode 100644 index 0000000000000..09ef2d95afc41 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageBasePolicyDetails.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Base class for the policies of providers using InMage replication. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMageBasePolicyDetails") +public class InMageBasePolicyDetails extends PolicyProviderSpecificDetails { + /** + * The recovery point threshold in minutes. + */ + @JsonProperty(value = "recoveryPointThresholdInMinutes") + private Integer recoveryPointThresholdInMinutes; + + /** + * The duration in minutes until which the recovery points need to be + * stored. + */ + @JsonProperty(value = "recoveryPointHistory") + private Integer recoveryPointHistory; + + /** + * The app consistent snapshot frequency in minutes. + */ + @JsonProperty(value = "appConsistentFrequencyInMinutes") + private Integer appConsistentFrequencyInMinutes; + + /** + * A value indicating whether multi-VM sync has to be enabled. + */ + @JsonProperty(value = "multiVmSyncStatus") + private String multiVmSyncStatus; + + /** + * Get the recovery point threshold in minutes. + * + * @return the recoveryPointThresholdInMinutes value + */ + public Integer recoveryPointThresholdInMinutes() { + return this.recoveryPointThresholdInMinutes; + } + + /** + * Set the recovery point threshold in minutes. + * + * @param recoveryPointThresholdInMinutes the recoveryPointThresholdInMinutes value to set + * @return the InMageBasePolicyDetails object itself. + */ + public InMageBasePolicyDetails withRecoveryPointThresholdInMinutes(Integer recoveryPointThresholdInMinutes) { + this.recoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + return this; + } + + /** + * Get the duration in minutes until which the recovery points need to be stored. + * + * @return the recoveryPointHistory value + */ + public Integer recoveryPointHistory() { + return this.recoveryPointHistory; + } + + /** + * Set the duration in minutes until which the recovery points need to be stored. + * + * @param recoveryPointHistory the recoveryPointHistory value to set + * @return the InMageBasePolicyDetails object itself. + */ + public InMageBasePolicyDetails withRecoveryPointHistory(Integer recoveryPointHistory) { + this.recoveryPointHistory = recoveryPointHistory; + return this; + } + + /** + * Get the app consistent snapshot frequency in minutes. + * + * @return the appConsistentFrequencyInMinutes value + */ + public Integer appConsistentFrequencyInMinutes() { + return this.appConsistentFrequencyInMinutes; + } + + /** + * Set the app consistent snapshot frequency in minutes. + * + * @param appConsistentFrequencyInMinutes the appConsistentFrequencyInMinutes value to set + * @return the InMageBasePolicyDetails object itself. + */ + public InMageBasePolicyDetails withAppConsistentFrequencyInMinutes(Integer appConsistentFrequencyInMinutes) { + this.appConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + return this; + } + + /** + * Get a value indicating whether multi-VM sync has to be enabled. + * + * @return the multiVmSyncStatus value + */ + public String multiVmSyncStatus() { + return this.multiVmSyncStatus; + } + + /** + * Set a value indicating whether multi-VM sync has to be enabled. + * + * @param multiVmSyncStatus the multiVmSyncStatus value to set + * @return the InMageBasePolicyDetails object itself. + */ + public InMageBasePolicyDetails withMultiVmSyncStatus(String multiVmSyncStatus) { + this.multiVmSyncStatus = multiVmSyncStatus; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageDisableProtectionProviderSpecificInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageDisableProtectionProviderSpecificInput.java new file mode 100644 index 0000000000000..1640aa5b64ed0 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageDisableProtectionProviderSpecificInput.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * InMage disable protection provider specific input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMage") +public class InMageDisableProtectionProviderSpecificInput extends DisableProtectionProviderSpecificInput { + /** + * A value indicating whether the replica VM should be destroyed or + * retained. Values from Delete and Retain. + */ + @JsonProperty(value = "replicaVmDeletionStatus") + private String replicaVmDeletionStatus; + + /** + * Get a value indicating whether the replica VM should be destroyed or retained. Values from Delete and Retain. + * + * @return the replicaVmDeletionStatus value + */ + public String replicaVmDeletionStatus() { + return this.replicaVmDeletionStatus; + } + + /** + * Set a value indicating whether the replica VM should be destroyed or retained. Values from Delete and Retain. + * + * @param replicaVmDeletionStatus the replicaVmDeletionStatus value to set + * @return the InMageDisableProtectionProviderSpecificInput object itself. + */ + public InMageDisableProtectionProviderSpecificInput withReplicaVmDeletionStatus(String replicaVmDeletionStatus) { + this.replicaVmDeletionStatus = replicaVmDeletionStatus; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageDiskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageDiskDetails.java new file mode 100644 index 0000000000000..f6d6c7c3e401e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageDiskDetails.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * VMware/Physical specific Disk Details. + */ +public class InMageDiskDetails { + /** + * The disk Id. + */ + @JsonProperty(value = "diskId") + private String diskId; + + /** + * The disk name. + */ + @JsonProperty(value = "diskName") + private String diskName; + + /** + * The disk size in MB. + */ + @JsonProperty(value = "diskSizeInMB") + private String diskSizeInMB; + + /** + * Whether disk is system disk or data disk. + */ + @JsonProperty(value = "diskType") + private String diskType; + + /** + * Whether disk is dynamic disk or basic disk. + */ + @JsonProperty(value = "diskConfiguration") + private String diskConfiguration; + + /** + * Volumes of the disk. + */ + @JsonProperty(value = "volumeList") + private List volumeList; + + /** + * Get the disk Id. + * + * @return the diskId value + */ + public String diskId() { + return this.diskId; + } + + /** + * Set the disk Id. + * + * @param diskId the diskId value to set + * @return the InMageDiskDetails object itself. + */ + public InMageDiskDetails withDiskId(String diskId) { + this.diskId = diskId; + return this; + } + + /** + * Get the disk name. + * + * @return the diskName value + */ + public String diskName() { + return this.diskName; + } + + /** + * Set the disk name. + * + * @param diskName the diskName value to set + * @return the InMageDiskDetails object itself. + */ + public InMageDiskDetails withDiskName(String diskName) { + this.diskName = diskName; + return this; + } + + /** + * Get the disk size in MB. + * + * @return the diskSizeInMB value + */ + public String diskSizeInMB() { + return this.diskSizeInMB; + } + + /** + * Set the disk size in MB. + * + * @param diskSizeInMB the diskSizeInMB value to set + * @return the InMageDiskDetails object itself. + */ + public InMageDiskDetails withDiskSizeInMB(String diskSizeInMB) { + this.diskSizeInMB = diskSizeInMB; + return this; + } + + /** + * Get whether disk is system disk or data disk. + * + * @return the diskType value + */ + public String diskType() { + return this.diskType; + } + + /** + * Set whether disk is system disk or data disk. + * + * @param diskType the diskType value to set + * @return the InMageDiskDetails object itself. + */ + public InMageDiskDetails withDiskType(String diskType) { + this.diskType = diskType; + return this; + } + + /** + * Get whether disk is dynamic disk or basic disk. + * + * @return the diskConfiguration value + */ + public String diskConfiguration() { + return this.diskConfiguration; + } + + /** + * Set whether disk is dynamic disk or basic disk. + * + * @param diskConfiguration the diskConfiguration value to set + * @return the InMageDiskDetails object itself. + */ + public InMageDiskDetails withDiskConfiguration(String diskConfiguration) { + this.diskConfiguration = diskConfiguration; + return this; + } + + /** + * Get volumes of the disk. + * + * @return the volumeList value + */ + public List volumeList() { + return this.volumeList; + } + + /** + * Set volumes of the disk. + * + * @param volumeList the volumeList value to set + * @return the InMageDiskDetails object itself. + */ + public InMageDiskDetails withVolumeList(List volumeList) { + this.volumeList = volumeList; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageDiskExclusionInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageDiskExclusionInput.java new file mode 100644 index 0000000000000..4cf26be8bffe6 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageDiskExclusionInput.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DiskExclusionInput when doing enable protection of virtual machine in InMage + * provider. + */ +public class InMageDiskExclusionInput { + /** + * The volume label based option for disk exclusion. + */ + @JsonProperty(value = "volumeOptions") + private List volumeOptions; + + /** + * The guest disk signature based option for disk exclusion. + */ + @JsonProperty(value = "diskSignatureOptions") + private List diskSignatureOptions; + + /** + * Get the volume label based option for disk exclusion. + * + * @return the volumeOptions value + */ + public List volumeOptions() { + return this.volumeOptions; + } + + /** + * Set the volume label based option for disk exclusion. + * + * @param volumeOptions the volumeOptions value to set + * @return the InMageDiskExclusionInput object itself. + */ + public InMageDiskExclusionInput withVolumeOptions(List volumeOptions) { + this.volumeOptions = volumeOptions; + return this; + } + + /** + * Get the guest disk signature based option for disk exclusion. + * + * @return the diskSignatureOptions value + */ + public List diskSignatureOptions() { + return this.diskSignatureOptions; + } + + /** + * Set the guest disk signature based option for disk exclusion. + * + * @param diskSignatureOptions the diskSignatureOptions value to set + * @return the InMageDiskExclusionInput object itself. + */ + public InMageDiskExclusionInput withDiskSignatureOptions(List diskSignatureOptions) { + this.diskSignatureOptions = diskSignatureOptions; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageDiskSignatureExclusionOptions.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageDiskSignatureExclusionOptions.java new file mode 100644 index 0000000000000..4298311dbc998 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageDiskSignatureExclusionOptions.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Guest disk signature based disk exclusion option when doing enable + * protection of virtual machine in InMage provider. + */ +public class InMageDiskSignatureExclusionOptions { + /** + * The guest signature of disk to be excluded from replication. + */ + @JsonProperty(value = "diskSignature") + private String diskSignature; + + /** + * Get the guest signature of disk to be excluded from replication. + * + * @return the diskSignature value + */ + public String diskSignature() { + return this.diskSignature; + } + + /** + * Set the guest signature of disk to be excluded from replication. + * + * @param diskSignature the diskSignature value to set + * @return the InMageDiskSignatureExclusionOptions object itself. + */ + public InMageDiskSignatureExclusionOptions withDiskSignature(String diskSignature) { + this.diskSignature = diskSignature; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageEnableProtectionInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageEnableProtectionInput.java new file mode 100644 index 0000000000000..d7eb875dda342 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageEnableProtectionInput.java @@ -0,0 +1,282 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * VMware Azure specific enable protection input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMage") +public class InMageEnableProtectionInput extends EnableProtectionProviderSpecificInput { + /** + * The Vm Name. + */ + @JsonProperty(value = "vmFriendlyName") + private String vmFriendlyName; + + /** + * The Master Target Id. + */ + @JsonProperty(value = "masterTargetId", required = true) + private String masterTargetId; + + /** + * The Process Server Id. + */ + @JsonProperty(value = "processServerId", required = true) + private String processServerId; + + /** + * The retention drive to use on the MT. + */ + @JsonProperty(value = "retentionDrive", required = true) + private String retentionDrive; + + /** + * The CS account Id. + */ + @JsonProperty(value = "runAsAccountId") + private String runAsAccountId; + + /** + * The multi vm group Id. + */ + @JsonProperty(value = "multiVmGroupId", required = true) + private String multiVmGroupId; + + /** + * The multi vm group name. + */ + @JsonProperty(value = "multiVmGroupName", required = true) + private String multiVmGroupName; + + /** + * The target datastore name. + */ + @JsonProperty(value = "datastoreName") + private String datastoreName; + + /** + * The enable disk exclusion input. + */ + @JsonProperty(value = "diskExclusionInput") + private InMageDiskExclusionInput diskExclusionInput; + + /** + * The disks to include list. + */ + @JsonProperty(value = "disksToInclude") + private List disksToInclude; + + /** + * Get the Vm Name. + * + * @return the vmFriendlyName value + */ + public String vmFriendlyName() { + return this.vmFriendlyName; + } + + /** + * Set the Vm Name. + * + * @param vmFriendlyName the vmFriendlyName value to set + * @return the InMageEnableProtectionInput object itself. + */ + public InMageEnableProtectionInput withVmFriendlyName(String vmFriendlyName) { + this.vmFriendlyName = vmFriendlyName; + return this; + } + + /** + * Get the Master Target Id. + * + * @return the masterTargetId value + */ + public String masterTargetId() { + return this.masterTargetId; + } + + /** + * Set the Master Target Id. + * + * @param masterTargetId the masterTargetId value to set + * @return the InMageEnableProtectionInput object itself. + */ + public InMageEnableProtectionInput withMasterTargetId(String masterTargetId) { + this.masterTargetId = masterTargetId; + return this; + } + + /** + * Get the Process Server Id. + * + * @return the processServerId value + */ + public String processServerId() { + return this.processServerId; + } + + /** + * Set the Process Server Id. + * + * @param processServerId the processServerId value to set + * @return the InMageEnableProtectionInput object itself. + */ + public InMageEnableProtectionInput withProcessServerId(String processServerId) { + this.processServerId = processServerId; + return this; + } + + /** + * Get the retention drive to use on the MT. + * + * @return the retentionDrive value + */ + public String retentionDrive() { + return this.retentionDrive; + } + + /** + * Set the retention drive to use on the MT. + * + * @param retentionDrive the retentionDrive value to set + * @return the InMageEnableProtectionInput object itself. + */ + public InMageEnableProtectionInput withRetentionDrive(String retentionDrive) { + this.retentionDrive = retentionDrive; + return this; + } + + /** + * Get the CS account Id. + * + * @return the runAsAccountId value + */ + public String runAsAccountId() { + return this.runAsAccountId; + } + + /** + * Set the CS account Id. + * + * @param runAsAccountId the runAsAccountId value to set + * @return the InMageEnableProtectionInput object itself. + */ + public InMageEnableProtectionInput withRunAsAccountId(String runAsAccountId) { + this.runAsAccountId = runAsAccountId; + return this; + } + + /** + * Get the multi vm group Id. + * + * @return the multiVmGroupId value + */ + public String multiVmGroupId() { + return this.multiVmGroupId; + } + + /** + * Set the multi vm group Id. + * + * @param multiVmGroupId the multiVmGroupId value to set + * @return the InMageEnableProtectionInput object itself. + */ + public InMageEnableProtectionInput withMultiVmGroupId(String multiVmGroupId) { + this.multiVmGroupId = multiVmGroupId; + return this; + } + + /** + * Get the multi vm group name. + * + * @return the multiVmGroupName value + */ + public String multiVmGroupName() { + return this.multiVmGroupName; + } + + /** + * Set the multi vm group name. + * + * @param multiVmGroupName the multiVmGroupName value to set + * @return the InMageEnableProtectionInput object itself. + */ + public InMageEnableProtectionInput withMultiVmGroupName(String multiVmGroupName) { + this.multiVmGroupName = multiVmGroupName; + return this; + } + + /** + * Get the target datastore name. + * + * @return the datastoreName value + */ + public String datastoreName() { + return this.datastoreName; + } + + /** + * Set the target datastore name. + * + * @param datastoreName the datastoreName value to set + * @return the InMageEnableProtectionInput object itself. + */ + public InMageEnableProtectionInput withDatastoreName(String datastoreName) { + this.datastoreName = datastoreName; + return this; + } + + /** + * Get the enable disk exclusion input. + * + * @return the diskExclusionInput value + */ + public InMageDiskExclusionInput diskExclusionInput() { + return this.diskExclusionInput; + } + + /** + * Set the enable disk exclusion input. + * + * @param diskExclusionInput the diskExclusionInput value to set + * @return the InMageEnableProtectionInput object itself. + */ + public InMageEnableProtectionInput withDiskExclusionInput(InMageDiskExclusionInput diskExclusionInput) { + this.diskExclusionInput = diskExclusionInput; + return this; + } + + /** + * Get the disks to include list. + * + * @return the disksToInclude value + */ + public List disksToInclude() { + return this.disksToInclude; + } + + /** + * Set the disks to include list. + * + * @param disksToInclude the disksToInclude value to set + * @return the InMageEnableProtectionInput object itself. + */ + public InMageEnableProtectionInput withDisksToInclude(List disksToInclude) { + this.disksToInclude = disksToInclude; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageFailoverProviderInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageFailoverProviderInput.java new file mode 100644 index 0000000000000..70c7eec014e9a --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageFailoverProviderInput.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Provider specific input for InMage failover. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMage") +public class InMageFailoverProviderInput extends ProviderSpecificFailoverInput { + /** + * The recovery point type. Values from LatestTime, LatestTag or Custom. In + * the case of custom, the recovery point provided by RecoveryPointId will + * be used. In the other two cases, recovery point id will be ignored. + * Possible values include: 'LatestTime', 'LatestTag', 'Custom'. + */ + @JsonProperty(value = "recoveryPointType") + private RecoveryPointType recoveryPointType; + + /** + * The recovery point id to be passed to failover to a particular recovery + * point. In case of latest recovery point, null should be passed. + */ + @JsonProperty(value = "recoveryPointId") + private String recoveryPointId; + + /** + * Get the recovery point type. Values from LatestTime, LatestTag or Custom. In the case of custom, the recovery point provided by RecoveryPointId will be used. In the other two cases, recovery point id will be ignored. Possible values include: 'LatestTime', 'LatestTag', 'Custom'. + * + * @return the recoveryPointType value + */ + public RecoveryPointType recoveryPointType() { + return this.recoveryPointType; + } + + /** + * Set the recovery point type. Values from LatestTime, LatestTag or Custom. In the case of custom, the recovery point provided by RecoveryPointId will be used. In the other two cases, recovery point id will be ignored. Possible values include: 'LatestTime', 'LatestTag', 'Custom'. + * + * @param recoveryPointType the recoveryPointType value to set + * @return the InMageFailoverProviderInput object itself. + */ + public InMageFailoverProviderInput withRecoveryPointType(RecoveryPointType recoveryPointType) { + this.recoveryPointType = recoveryPointType; + return this; + } + + /** + * Get the recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. + * + * @return the recoveryPointId value + */ + public String recoveryPointId() { + return this.recoveryPointId; + } + + /** + * Set the recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. + * + * @param recoveryPointId the recoveryPointId value to set + * @return the InMageFailoverProviderInput object itself. + */ + public InMageFailoverProviderInput withRecoveryPointId(String recoveryPointId) { + this.recoveryPointId = recoveryPointId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMagePolicyDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMagePolicyDetails.java new file mode 100644 index 0000000000000..e6bd2b40ad273 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMagePolicyDetails.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * InMage specific protection profile details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMage") +public class InMagePolicyDetails extends PolicyProviderSpecificDetails { + /** + * The recovery point threshold in minutes. + */ + @JsonProperty(value = "recoveryPointThresholdInMinutes") + private Integer recoveryPointThresholdInMinutes; + + /** + * The duration in minutes until which the recovery points need to be + * stored. + */ + @JsonProperty(value = "recoveryPointHistory") + private Integer recoveryPointHistory; + + /** + * The app consistent snapshot frequency in minutes. + */ + @JsonProperty(value = "appConsistentFrequencyInMinutes") + private Integer appConsistentFrequencyInMinutes; + + /** + * A value indicating whether multi-VM sync has to be enabled. + */ + @JsonProperty(value = "multiVmSyncStatus") + private String multiVmSyncStatus; + + /** + * Get the recovery point threshold in minutes. + * + * @return the recoveryPointThresholdInMinutes value + */ + public Integer recoveryPointThresholdInMinutes() { + return this.recoveryPointThresholdInMinutes; + } + + /** + * Set the recovery point threshold in minutes. + * + * @param recoveryPointThresholdInMinutes the recoveryPointThresholdInMinutes value to set + * @return the InMagePolicyDetails object itself. + */ + public InMagePolicyDetails withRecoveryPointThresholdInMinutes(Integer recoveryPointThresholdInMinutes) { + this.recoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + return this; + } + + /** + * Get the duration in minutes until which the recovery points need to be stored. + * + * @return the recoveryPointHistory value + */ + public Integer recoveryPointHistory() { + return this.recoveryPointHistory; + } + + /** + * Set the duration in minutes until which the recovery points need to be stored. + * + * @param recoveryPointHistory the recoveryPointHistory value to set + * @return the InMagePolicyDetails object itself. + */ + public InMagePolicyDetails withRecoveryPointHistory(Integer recoveryPointHistory) { + this.recoveryPointHistory = recoveryPointHistory; + return this; + } + + /** + * Get the app consistent snapshot frequency in minutes. + * + * @return the appConsistentFrequencyInMinutes value + */ + public Integer appConsistentFrequencyInMinutes() { + return this.appConsistentFrequencyInMinutes; + } + + /** + * Set the app consistent snapshot frequency in minutes. + * + * @param appConsistentFrequencyInMinutes the appConsistentFrequencyInMinutes value to set + * @return the InMagePolicyDetails object itself. + */ + public InMagePolicyDetails withAppConsistentFrequencyInMinutes(Integer appConsistentFrequencyInMinutes) { + this.appConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + return this; + } + + /** + * Get a value indicating whether multi-VM sync has to be enabled. + * + * @return the multiVmSyncStatus value + */ + public String multiVmSyncStatus() { + return this.multiVmSyncStatus; + } + + /** + * Set a value indicating whether multi-VM sync has to be enabled. + * + * @param multiVmSyncStatus the multiVmSyncStatus value to set + * @return the InMagePolicyDetails object itself. + */ + public InMagePolicyDetails withMultiVmSyncStatus(String multiVmSyncStatus) { + this.multiVmSyncStatus = multiVmSyncStatus; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMagePolicyInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMagePolicyInput.java new file mode 100644 index 0000000000000..badbc41ef6eff --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMagePolicyInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * VMWare Azure specific protection profile Input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMage") +public class InMagePolicyInput extends PolicyProviderSpecificInput { + /** + * The recovery point threshold in minutes. + */ + @JsonProperty(value = "recoveryPointThresholdInMinutes") + private Integer recoveryPointThresholdInMinutes; + + /** + * The duration in minutes until which the recovery points need to be + * stored. + */ + @JsonProperty(value = "recoveryPointHistory") + private Integer recoveryPointHistory; + + /** + * The app consistent snapshot frequency (in minutes). + */ + @JsonProperty(value = "appConsistentFrequencyInMinutes") + private Integer appConsistentFrequencyInMinutes; + + /** + * A value indicating whether multi-VM sync has to be enabled. Value should + * be 'Enabled' or 'Disabled'. Possible values include: 'Enable', + * 'Disable'. + */ + @JsonProperty(value = "multiVmSyncStatus", required = true) + private SetMultiVmSyncStatus multiVmSyncStatus; + + /** + * Get the recovery point threshold in minutes. + * + * @return the recoveryPointThresholdInMinutes value + */ + public Integer recoveryPointThresholdInMinutes() { + return this.recoveryPointThresholdInMinutes; + } + + /** + * Set the recovery point threshold in minutes. + * + * @param recoveryPointThresholdInMinutes the recoveryPointThresholdInMinutes value to set + * @return the InMagePolicyInput object itself. + */ + public InMagePolicyInput withRecoveryPointThresholdInMinutes(Integer recoveryPointThresholdInMinutes) { + this.recoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + return this; + } + + /** + * Get the duration in minutes until which the recovery points need to be stored. + * + * @return the recoveryPointHistory value + */ + public Integer recoveryPointHistory() { + return this.recoveryPointHistory; + } + + /** + * Set the duration in minutes until which the recovery points need to be stored. + * + * @param recoveryPointHistory the recoveryPointHistory value to set + * @return the InMagePolicyInput object itself. + */ + public InMagePolicyInput withRecoveryPointHistory(Integer recoveryPointHistory) { + this.recoveryPointHistory = recoveryPointHistory; + return this; + } + + /** + * Get the app consistent snapshot frequency (in minutes). + * + * @return the appConsistentFrequencyInMinutes value + */ + public Integer appConsistentFrequencyInMinutes() { + return this.appConsistentFrequencyInMinutes; + } + + /** + * Set the app consistent snapshot frequency (in minutes). + * + * @param appConsistentFrequencyInMinutes the appConsistentFrequencyInMinutes value to set + * @return the InMagePolicyInput object itself. + */ + public InMagePolicyInput withAppConsistentFrequencyInMinutes(Integer appConsistentFrequencyInMinutes) { + this.appConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + return this; + } + + /** + * Get a value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable'. + * + * @return the multiVmSyncStatus value + */ + public SetMultiVmSyncStatus multiVmSyncStatus() { + return this.multiVmSyncStatus; + } + + /** + * Set a value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable'. + * + * @param multiVmSyncStatus the multiVmSyncStatus value to set + * @return the InMagePolicyInput object itself. + */ + public InMagePolicyInput withMultiVmSyncStatus(SetMultiVmSyncStatus multiVmSyncStatus) { + this.multiVmSyncStatus = multiVmSyncStatus; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageProtectedDiskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageProtectedDiskDetails.java new file mode 100644 index 0000000000000..a38cedcd8e5d0 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageProtectedDiskDetails.java @@ -0,0 +1,408 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * InMage protected disk details. + */ +public class InMageProtectedDiskDetails { + /** + * The disk id. + */ + @JsonProperty(value = "diskId") + private String diskId; + + /** + * The disk name. + */ + @JsonProperty(value = "diskName") + private String diskName; + + /** + * The protection stage. + */ + @JsonProperty(value = "protectionStage") + private String protectionStage; + + /** + * The health error code for the disk. + */ + @JsonProperty(value = "healthErrorCode") + private String healthErrorCode; + + /** + * The RPO in seconds. + */ + @JsonProperty(value = "rpoInSeconds") + private Long rpoInSeconds; + + /** + * A value indicating whether resync is required for this disk. + */ + @JsonProperty(value = "resyncRequired") + private String resyncRequired; + + /** + * The resync progress percentage. + */ + @JsonProperty(value = "resyncProgressPercentage") + private Integer resyncProgressPercentage; + + /** + * The resync duration in seconds. + */ + @JsonProperty(value = "resyncDurationInSeconds") + private Long resyncDurationInSeconds; + + /** + * The disk capacity in bytes. + */ + @JsonProperty(value = "diskCapacityInBytes") + private Long diskCapacityInBytes; + + /** + * The file system capacity in bytes. + */ + @JsonProperty(value = "fileSystemCapacityInBytes") + private Long fileSystemCapacityInBytes; + + /** + * The source data transit in MB. + */ + @JsonProperty(value = "sourceDataInMB") + private Double sourceDataInMB; + + /** + * The PS data transit in MB. + */ + @JsonProperty(value = "psDataInMB") + private Double psDataInMB; + + /** + * The target data transit in MB. + */ + @JsonProperty(value = "targetDataInMB") + private Double targetDataInMB; + + /** + * A value indicating whether disk is resized. + */ + @JsonProperty(value = "diskResized") + private String diskResized; + + /** + * The last RPO calculated time. + */ + @JsonProperty(value = "lastRpoCalculatedTime") + private DateTime lastRpoCalculatedTime; + + /** + * Get the disk id. + * + * @return the diskId value + */ + public String diskId() { + return this.diskId; + } + + /** + * Set the disk id. + * + * @param diskId the diskId value to set + * @return the InMageProtectedDiskDetails object itself. + */ + public InMageProtectedDiskDetails withDiskId(String diskId) { + this.diskId = diskId; + return this; + } + + /** + * Get the disk name. + * + * @return the diskName value + */ + public String diskName() { + return this.diskName; + } + + /** + * Set the disk name. + * + * @param diskName the diskName value to set + * @return the InMageProtectedDiskDetails object itself. + */ + public InMageProtectedDiskDetails withDiskName(String diskName) { + this.diskName = diskName; + return this; + } + + /** + * Get the protection stage. + * + * @return the protectionStage value + */ + public String protectionStage() { + return this.protectionStage; + } + + /** + * Set the protection stage. + * + * @param protectionStage the protectionStage value to set + * @return the InMageProtectedDiskDetails object itself. + */ + public InMageProtectedDiskDetails withProtectionStage(String protectionStage) { + this.protectionStage = protectionStage; + return this; + } + + /** + * Get the health error code for the disk. + * + * @return the healthErrorCode value + */ + public String healthErrorCode() { + return this.healthErrorCode; + } + + /** + * Set the health error code for the disk. + * + * @param healthErrorCode the healthErrorCode value to set + * @return the InMageProtectedDiskDetails object itself. + */ + public InMageProtectedDiskDetails withHealthErrorCode(String healthErrorCode) { + this.healthErrorCode = healthErrorCode; + return this; + } + + /** + * Get the RPO in seconds. + * + * @return the rpoInSeconds value + */ + public Long rpoInSeconds() { + return this.rpoInSeconds; + } + + /** + * Set the RPO in seconds. + * + * @param rpoInSeconds the rpoInSeconds value to set + * @return the InMageProtectedDiskDetails object itself. + */ + public InMageProtectedDiskDetails withRpoInSeconds(Long rpoInSeconds) { + this.rpoInSeconds = rpoInSeconds; + return this; + } + + /** + * Get a value indicating whether resync is required for this disk. + * + * @return the resyncRequired value + */ + public String resyncRequired() { + return this.resyncRequired; + } + + /** + * Set a value indicating whether resync is required for this disk. + * + * @param resyncRequired the resyncRequired value to set + * @return the InMageProtectedDiskDetails object itself. + */ + public InMageProtectedDiskDetails withResyncRequired(String resyncRequired) { + this.resyncRequired = resyncRequired; + return this; + } + + /** + * Get the resync progress percentage. + * + * @return the resyncProgressPercentage value + */ + public Integer resyncProgressPercentage() { + return this.resyncProgressPercentage; + } + + /** + * Set the resync progress percentage. + * + * @param resyncProgressPercentage the resyncProgressPercentage value to set + * @return the InMageProtectedDiskDetails object itself. + */ + public InMageProtectedDiskDetails withResyncProgressPercentage(Integer resyncProgressPercentage) { + this.resyncProgressPercentage = resyncProgressPercentage; + return this; + } + + /** + * Get the resync duration in seconds. + * + * @return the resyncDurationInSeconds value + */ + public Long resyncDurationInSeconds() { + return this.resyncDurationInSeconds; + } + + /** + * Set the resync duration in seconds. + * + * @param resyncDurationInSeconds the resyncDurationInSeconds value to set + * @return the InMageProtectedDiskDetails object itself. + */ + public InMageProtectedDiskDetails withResyncDurationInSeconds(Long resyncDurationInSeconds) { + this.resyncDurationInSeconds = resyncDurationInSeconds; + return this; + } + + /** + * Get the disk capacity in bytes. + * + * @return the diskCapacityInBytes value + */ + public Long diskCapacityInBytes() { + return this.diskCapacityInBytes; + } + + /** + * Set the disk capacity in bytes. + * + * @param diskCapacityInBytes the diskCapacityInBytes value to set + * @return the InMageProtectedDiskDetails object itself. + */ + public InMageProtectedDiskDetails withDiskCapacityInBytes(Long diskCapacityInBytes) { + this.diskCapacityInBytes = diskCapacityInBytes; + return this; + } + + /** + * Get the file system capacity in bytes. + * + * @return the fileSystemCapacityInBytes value + */ + public Long fileSystemCapacityInBytes() { + return this.fileSystemCapacityInBytes; + } + + /** + * Set the file system capacity in bytes. + * + * @param fileSystemCapacityInBytes the fileSystemCapacityInBytes value to set + * @return the InMageProtectedDiskDetails object itself. + */ + public InMageProtectedDiskDetails withFileSystemCapacityInBytes(Long fileSystemCapacityInBytes) { + this.fileSystemCapacityInBytes = fileSystemCapacityInBytes; + return this; + } + + /** + * Get the source data transit in MB. + * + * @return the sourceDataInMB value + */ + public Double sourceDataInMB() { + return this.sourceDataInMB; + } + + /** + * Set the source data transit in MB. + * + * @param sourceDataInMB the sourceDataInMB value to set + * @return the InMageProtectedDiskDetails object itself. + */ + public InMageProtectedDiskDetails withSourceDataInMB(Double sourceDataInMB) { + this.sourceDataInMB = sourceDataInMB; + return this; + } + + /** + * Get the PS data transit in MB. + * + * @return the psDataInMB value + */ + public Double psDataInMB() { + return this.psDataInMB; + } + + /** + * Set the PS data transit in MB. + * + * @param psDataInMB the psDataInMB value to set + * @return the InMageProtectedDiskDetails object itself. + */ + public InMageProtectedDiskDetails withPsDataInMB(Double psDataInMB) { + this.psDataInMB = psDataInMB; + return this; + } + + /** + * Get the target data transit in MB. + * + * @return the targetDataInMB value + */ + public Double targetDataInMB() { + return this.targetDataInMB; + } + + /** + * Set the target data transit in MB. + * + * @param targetDataInMB the targetDataInMB value to set + * @return the InMageProtectedDiskDetails object itself. + */ + public InMageProtectedDiskDetails withTargetDataInMB(Double targetDataInMB) { + this.targetDataInMB = targetDataInMB; + return this; + } + + /** + * Get a value indicating whether disk is resized. + * + * @return the diskResized value + */ + public String diskResized() { + return this.diskResized; + } + + /** + * Set a value indicating whether disk is resized. + * + * @param diskResized the diskResized value to set + * @return the InMageProtectedDiskDetails object itself. + */ + public InMageProtectedDiskDetails withDiskResized(String diskResized) { + this.diskResized = diskResized; + return this; + } + + /** + * Get the last RPO calculated time. + * + * @return the lastRpoCalculatedTime value + */ + public DateTime lastRpoCalculatedTime() { + return this.lastRpoCalculatedTime; + } + + /** + * Set the last RPO calculated time. + * + * @param lastRpoCalculatedTime the lastRpoCalculatedTime value to set + * @return the InMageProtectedDiskDetails object itself. + */ + public InMageProtectedDiskDetails withLastRpoCalculatedTime(DateTime lastRpoCalculatedTime) { + this.lastRpoCalculatedTime = lastRpoCalculatedTime; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageReplicationDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageReplicationDetails.java new file mode 100644 index 0000000000000..3572e842e217b --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageReplicationDetails.java @@ -0,0 +1,992 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * InMage provider specific settings. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMage") +public class InMageReplicationDetails extends ReplicationProviderSpecificSettings { + /** + * The active location of the VM. If the VM is being protected from Azure, + * this field will take values from { Azure, OnPrem }. If the VM is being + * protected between two data-centers, this field will be OnPrem always. + */ + @JsonProperty(value = "activeSiteType") + private String activeSiteType; + + /** + * The CPU count of the VM on the primary side. + */ + @JsonProperty(value = "sourceVmCPUCount") + private Integer sourceVmCPUCount; + + /** + * The RAM size of the VM on the primary side. + */ + @JsonProperty(value = "sourceVmRAMSizeInMB") + private Integer sourceVmRAMSizeInMB; + + /** + * The OS details. + */ + @JsonProperty(value = "osDetails") + private OSDiskDetails osDetails; + + /** + * The protection stage. + */ + @JsonProperty(value = "protectionStage") + private String protectionStage; + + /** + * The virtual machine Id. + */ + @JsonProperty(value = "vmId") + private String vmId; + + /** + * The protection state for the vm. + */ + @JsonProperty(value = "vmProtectionState") + private String vmProtectionState; + + /** + * The protection state description for the vm. + */ + @JsonProperty(value = "vmProtectionStateDescription") + private String vmProtectionStateDescription; + + /** + * The resync details of the machine. + */ + @JsonProperty(value = "resyncDetails") + private InitialReplicationDetails resyncDetails; + + /** + * The retention window start time. + */ + @JsonProperty(value = "retentionWindowStart") + private DateTime retentionWindowStart; + + /** + * The retention window end time. + */ + @JsonProperty(value = "retentionWindowEnd") + private DateTime retentionWindowEnd; + + /** + * The compressed data change rate in MB. + */ + @JsonProperty(value = "compressedDataRateInMB") + private Double compressedDataRateInMB; + + /** + * The uncompressed data change rate in MB. + */ + @JsonProperty(value = "uncompressedDataRateInMB") + private Double uncompressedDataRateInMB; + + /** + * The RPO in seconds. + */ + @JsonProperty(value = "rpoInSeconds") + private Long rpoInSeconds; + + /** + * The list of protected disks. + */ + @JsonProperty(value = "protectedDisks") + private List protectedDisks; + + /** + * The source IP address. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * The last heartbeat received from the source server. + */ + @JsonProperty(value = "lastHeartbeat") + private DateTime lastHeartbeat; + + /** + * The process server Id. + */ + @JsonProperty(value = "processServerId") + private String processServerId; + + /** + * The master target Id. + */ + @JsonProperty(value = "masterTargetId") + private String masterTargetId; + + /** + * The collection of Consistency points. + */ + @JsonProperty(value = "consistencyPoints") + private Map consistencyPoints; + + /** + * A value indicating whether any disk is resized for this VM. + */ + @JsonProperty(value = "diskResized") + private String diskResized; + + /** + * A value indicating whether the source server requires a restart after + * update. + */ + @JsonProperty(value = "rebootAfterUpdateStatus") + private String rebootAfterUpdateStatus; + + /** + * The multi vm group Id, if any. + */ + @JsonProperty(value = "multiVmGroupId") + private String multiVmGroupId; + + /** + * The multi vm group name, if any. + */ + @JsonProperty(value = "multiVmGroupName") + private String multiVmGroupName; + + /** + * A value indicating whether the multi vm sync is enabled or disabled. + */ + @JsonProperty(value = "multiVmSyncStatus") + private String multiVmSyncStatus; + + /** + * The agent details. + */ + @JsonProperty(value = "agentDetails") + private InMageAgentDetails agentDetails; + + /** + * The vCenter infrastructure Id. + */ + @JsonProperty(value = "vCenterInfrastructureId") + private String vCenterInfrastructureId; + + /** + * The infrastructure VM Id. + */ + @JsonProperty(value = "infrastructureVmId") + private String infrastructureVmId; + + /** + * The PE Network details. + */ + @JsonProperty(value = "vmNics") + private List vmNics; + + /** + * A value indicating the discovery type of the machine. + */ + @JsonProperty(value = "discoveryType") + private String discoveryType; + + /** + * A value indicating the underlying Azure storage account. If the VM is + * not running in Azure, this value shall be set to null. + */ + @JsonProperty(value = "azureStorageAccountId") + private String azureStorageAccountId; + + /** + * The datastores of the on-premise machine Value can be list of strings + * that contain datastore names. + */ + @JsonProperty(value = "datastores") + private List datastores; + + /** + * The validation errors of the on-premise machine Value can be list of + * validation errors. + */ + @JsonProperty(value = "validationErrors") + private List validationErrors; + + /** + * The last RPO calculated time. + */ + @JsonProperty(value = "lastRpoCalculatedTime") + private DateTime lastRpoCalculatedTime; + + /** + * The last update time received from on-prem components. + */ + @JsonProperty(value = "lastUpdateReceivedTime") + private DateTime lastUpdateReceivedTime; + + /** + * The replica id of the protected item. + */ + @JsonProperty(value = "replicaId") + private String replicaId; + + /** + * The OS Version of the protected item. + */ + @JsonProperty(value = "osVersion") + private String osVersion; + + /** + * Get the active location of the VM. If the VM is being protected from Azure, this field will take values from { Azure, OnPrem }. If the VM is being protected between two data-centers, this field will be OnPrem always. + * + * @return the activeSiteType value + */ + public String activeSiteType() { + return this.activeSiteType; + } + + /** + * Set the active location of the VM. If the VM is being protected from Azure, this field will take values from { Azure, OnPrem }. If the VM is being protected between two data-centers, this field will be OnPrem always. + * + * @param activeSiteType the activeSiteType value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withActiveSiteType(String activeSiteType) { + this.activeSiteType = activeSiteType; + return this; + } + + /** + * Get the CPU count of the VM on the primary side. + * + * @return the sourceVmCPUCount value + */ + public Integer sourceVmCPUCount() { + return this.sourceVmCPUCount; + } + + /** + * Set the CPU count of the VM on the primary side. + * + * @param sourceVmCPUCount the sourceVmCPUCount value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withSourceVmCPUCount(Integer sourceVmCPUCount) { + this.sourceVmCPUCount = sourceVmCPUCount; + return this; + } + + /** + * Get the RAM size of the VM on the primary side. + * + * @return the sourceVmRAMSizeInMB value + */ + public Integer sourceVmRAMSizeInMB() { + return this.sourceVmRAMSizeInMB; + } + + /** + * Set the RAM size of the VM on the primary side. + * + * @param sourceVmRAMSizeInMB the sourceVmRAMSizeInMB value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withSourceVmRAMSizeInMB(Integer sourceVmRAMSizeInMB) { + this.sourceVmRAMSizeInMB = sourceVmRAMSizeInMB; + return this; + } + + /** + * Get the OS details. + * + * @return the osDetails value + */ + public OSDiskDetails osDetails() { + return this.osDetails; + } + + /** + * Set the OS details. + * + * @param osDetails the osDetails value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withOsDetails(OSDiskDetails osDetails) { + this.osDetails = osDetails; + return this; + } + + /** + * Get the protection stage. + * + * @return the protectionStage value + */ + public String protectionStage() { + return this.protectionStage; + } + + /** + * Set the protection stage. + * + * @param protectionStage the protectionStage value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withProtectionStage(String protectionStage) { + this.protectionStage = protectionStage; + return this; + } + + /** + * Get the virtual machine Id. + * + * @return the vmId value + */ + public String vmId() { + return this.vmId; + } + + /** + * Set the virtual machine Id. + * + * @param vmId the vmId value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withVmId(String vmId) { + this.vmId = vmId; + return this; + } + + /** + * Get the protection state for the vm. + * + * @return the vmProtectionState value + */ + public String vmProtectionState() { + return this.vmProtectionState; + } + + /** + * Set the protection state for the vm. + * + * @param vmProtectionState the vmProtectionState value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withVmProtectionState(String vmProtectionState) { + this.vmProtectionState = vmProtectionState; + return this; + } + + /** + * Get the protection state description for the vm. + * + * @return the vmProtectionStateDescription value + */ + public String vmProtectionStateDescription() { + return this.vmProtectionStateDescription; + } + + /** + * Set the protection state description for the vm. + * + * @param vmProtectionStateDescription the vmProtectionStateDescription value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withVmProtectionStateDescription(String vmProtectionStateDescription) { + this.vmProtectionStateDescription = vmProtectionStateDescription; + return this; + } + + /** + * Get the resync details of the machine. + * + * @return the resyncDetails value + */ + public InitialReplicationDetails resyncDetails() { + return this.resyncDetails; + } + + /** + * Set the resync details of the machine. + * + * @param resyncDetails the resyncDetails value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withResyncDetails(InitialReplicationDetails resyncDetails) { + this.resyncDetails = resyncDetails; + return this; + } + + /** + * Get the retention window start time. + * + * @return the retentionWindowStart value + */ + public DateTime retentionWindowStart() { + return this.retentionWindowStart; + } + + /** + * Set the retention window start time. + * + * @param retentionWindowStart the retentionWindowStart value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withRetentionWindowStart(DateTime retentionWindowStart) { + this.retentionWindowStart = retentionWindowStart; + return this; + } + + /** + * Get the retention window end time. + * + * @return the retentionWindowEnd value + */ + public DateTime retentionWindowEnd() { + return this.retentionWindowEnd; + } + + /** + * Set the retention window end time. + * + * @param retentionWindowEnd the retentionWindowEnd value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withRetentionWindowEnd(DateTime retentionWindowEnd) { + this.retentionWindowEnd = retentionWindowEnd; + return this; + } + + /** + * Get the compressed data change rate in MB. + * + * @return the compressedDataRateInMB value + */ + public Double compressedDataRateInMB() { + return this.compressedDataRateInMB; + } + + /** + * Set the compressed data change rate in MB. + * + * @param compressedDataRateInMB the compressedDataRateInMB value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withCompressedDataRateInMB(Double compressedDataRateInMB) { + this.compressedDataRateInMB = compressedDataRateInMB; + return this; + } + + /** + * Get the uncompressed data change rate in MB. + * + * @return the uncompressedDataRateInMB value + */ + public Double uncompressedDataRateInMB() { + return this.uncompressedDataRateInMB; + } + + /** + * Set the uncompressed data change rate in MB. + * + * @param uncompressedDataRateInMB the uncompressedDataRateInMB value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withUncompressedDataRateInMB(Double uncompressedDataRateInMB) { + this.uncompressedDataRateInMB = uncompressedDataRateInMB; + return this; + } + + /** + * Get the RPO in seconds. + * + * @return the rpoInSeconds value + */ + public Long rpoInSeconds() { + return this.rpoInSeconds; + } + + /** + * Set the RPO in seconds. + * + * @param rpoInSeconds the rpoInSeconds value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withRpoInSeconds(Long rpoInSeconds) { + this.rpoInSeconds = rpoInSeconds; + return this; + } + + /** + * Get the list of protected disks. + * + * @return the protectedDisks value + */ + public List protectedDisks() { + return this.protectedDisks; + } + + /** + * Set the list of protected disks. + * + * @param protectedDisks the protectedDisks value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withProtectedDisks(List protectedDisks) { + this.protectedDisks = protectedDisks; + return this; + } + + /** + * Get the source IP address. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the source IP address. + * + * @param ipAddress the ipAddress value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the last heartbeat received from the source server. + * + * @return the lastHeartbeat value + */ + public DateTime lastHeartbeat() { + return this.lastHeartbeat; + } + + /** + * Set the last heartbeat received from the source server. + * + * @param lastHeartbeat the lastHeartbeat value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withLastHeartbeat(DateTime lastHeartbeat) { + this.lastHeartbeat = lastHeartbeat; + return this; + } + + /** + * Get the process server Id. + * + * @return the processServerId value + */ + public String processServerId() { + return this.processServerId; + } + + /** + * Set the process server Id. + * + * @param processServerId the processServerId value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withProcessServerId(String processServerId) { + this.processServerId = processServerId; + return this; + } + + /** + * Get the master target Id. + * + * @return the masterTargetId value + */ + public String masterTargetId() { + return this.masterTargetId; + } + + /** + * Set the master target Id. + * + * @param masterTargetId the masterTargetId value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withMasterTargetId(String masterTargetId) { + this.masterTargetId = masterTargetId; + return this; + } + + /** + * Get the collection of Consistency points. + * + * @return the consistencyPoints value + */ + public Map consistencyPoints() { + return this.consistencyPoints; + } + + /** + * Set the collection of Consistency points. + * + * @param consistencyPoints the consistencyPoints value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withConsistencyPoints(Map consistencyPoints) { + this.consistencyPoints = consistencyPoints; + return this; + } + + /** + * Get a value indicating whether any disk is resized for this VM. + * + * @return the diskResized value + */ + public String diskResized() { + return this.diskResized; + } + + /** + * Set a value indicating whether any disk is resized for this VM. + * + * @param diskResized the diskResized value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withDiskResized(String diskResized) { + this.diskResized = diskResized; + return this; + } + + /** + * Get a value indicating whether the source server requires a restart after update. + * + * @return the rebootAfterUpdateStatus value + */ + public String rebootAfterUpdateStatus() { + return this.rebootAfterUpdateStatus; + } + + /** + * Set a value indicating whether the source server requires a restart after update. + * + * @param rebootAfterUpdateStatus the rebootAfterUpdateStatus value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withRebootAfterUpdateStatus(String rebootAfterUpdateStatus) { + this.rebootAfterUpdateStatus = rebootAfterUpdateStatus; + return this; + } + + /** + * Get the multi vm group Id, if any. + * + * @return the multiVmGroupId value + */ + public String multiVmGroupId() { + return this.multiVmGroupId; + } + + /** + * Set the multi vm group Id, if any. + * + * @param multiVmGroupId the multiVmGroupId value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withMultiVmGroupId(String multiVmGroupId) { + this.multiVmGroupId = multiVmGroupId; + return this; + } + + /** + * Get the multi vm group name, if any. + * + * @return the multiVmGroupName value + */ + public String multiVmGroupName() { + return this.multiVmGroupName; + } + + /** + * Set the multi vm group name, if any. + * + * @param multiVmGroupName the multiVmGroupName value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withMultiVmGroupName(String multiVmGroupName) { + this.multiVmGroupName = multiVmGroupName; + return this; + } + + /** + * Get a value indicating whether the multi vm sync is enabled or disabled. + * + * @return the multiVmSyncStatus value + */ + public String multiVmSyncStatus() { + return this.multiVmSyncStatus; + } + + /** + * Set a value indicating whether the multi vm sync is enabled or disabled. + * + * @param multiVmSyncStatus the multiVmSyncStatus value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withMultiVmSyncStatus(String multiVmSyncStatus) { + this.multiVmSyncStatus = multiVmSyncStatus; + return this; + } + + /** + * Get the agent details. + * + * @return the agentDetails value + */ + public InMageAgentDetails agentDetails() { + return this.agentDetails; + } + + /** + * Set the agent details. + * + * @param agentDetails the agentDetails value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withAgentDetails(InMageAgentDetails agentDetails) { + this.agentDetails = agentDetails; + return this; + } + + /** + * Get the vCenter infrastructure Id. + * + * @return the vCenterInfrastructureId value + */ + public String vCenterInfrastructureId() { + return this.vCenterInfrastructureId; + } + + /** + * Set the vCenter infrastructure Id. + * + * @param vCenterInfrastructureId the vCenterInfrastructureId value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withVCenterInfrastructureId(String vCenterInfrastructureId) { + this.vCenterInfrastructureId = vCenterInfrastructureId; + return this; + } + + /** + * Get the infrastructure VM Id. + * + * @return the infrastructureVmId value + */ + public String infrastructureVmId() { + return this.infrastructureVmId; + } + + /** + * Set the infrastructure VM Id. + * + * @param infrastructureVmId the infrastructureVmId value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withInfrastructureVmId(String infrastructureVmId) { + this.infrastructureVmId = infrastructureVmId; + return this; + } + + /** + * Get the PE Network details. + * + * @return the vmNics value + */ + public List vmNics() { + return this.vmNics; + } + + /** + * Set the PE Network details. + * + * @param vmNics the vmNics value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withVmNics(List vmNics) { + this.vmNics = vmNics; + return this; + } + + /** + * Get a value indicating the discovery type of the machine. + * + * @return the discoveryType value + */ + public String discoveryType() { + return this.discoveryType; + } + + /** + * Set a value indicating the discovery type of the machine. + * + * @param discoveryType the discoveryType value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withDiscoveryType(String discoveryType) { + this.discoveryType = discoveryType; + return this; + } + + /** + * Get a value indicating the underlying Azure storage account. If the VM is not running in Azure, this value shall be set to null. + * + * @return the azureStorageAccountId value + */ + public String azureStorageAccountId() { + return this.azureStorageAccountId; + } + + /** + * Set a value indicating the underlying Azure storage account. If the VM is not running in Azure, this value shall be set to null. + * + * @param azureStorageAccountId the azureStorageAccountId value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withAzureStorageAccountId(String azureStorageAccountId) { + this.azureStorageAccountId = azureStorageAccountId; + return this; + } + + /** + * Get the datastores of the on-premise machine Value can be list of strings that contain datastore names. + * + * @return the datastores value + */ + public List datastores() { + return this.datastores; + } + + /** + * Set the datastores of the on-premise machine Value can be list of strings that contain datastore names. + * + * @param datastores the datastores value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withDatastores(List datastores) { + this.datastores = datastores; + return this; + } + + /** + * Get the validation errors of the on-premise machine Value can be list of validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + + /** + * Set the validation errors of the on-premise machine Value can be list of validation errors. + * + * @param validationErrors the validationErrors value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withValidationErrors(List validationErrors) { + this.validationErrors = validationErrors; + return this; + } + + /** + * Get the last RPO calculated time. + * + * @return the lastRpoCalculatedTime value + */ + public DateTime lastRpoCalculatedTime() { + return this.lastRpoCalculatedTime; + } + + /** + * Set the last RPO calculated time. + * + * @param lastRpoCalculatedTime the lastRpoCalculatedTime value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withLastRpoCalculatedTime(DateTime lastRpoCalculatedTime) { + this.lastRpoCalculatedTime = lastRpoCalculatedTime; + return this; + } + + /** + * Get the last update time received from on-prem components. + * + * @return the lastUpdateReceivedTime value + */ + public DateTime lastUpdateReceivedTime() { + return this.lastUpdateReceivedTime; + } + + /** + * Set the last update time received from on-prem components. + * + * @param lastUpdateReceivedTime the lastUpdateReceivedTime value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withLastUpdateReceivedTime(DateTime lastUpdateReceivedTime) { + this.lastUpdateReceivedTime = lastUpdateReceivedTime; + return this; + } + + /** + * Get the replica id of the protected item. + * + * @return the replicaId value + */ + public String replicaId() { + return this.replicaId; + } + + /** + * Set the replica id of the protected item. + * + * @param replicaId the replicaId value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withReplicaId(String replicaId) { + this.replicaId = replicaId; + return this; + } + + /** + * Get the OS Version of the protected item. + * + * @return the osVersion value + */ + public String osVersion() { + return this.osVersion; + } + + /** + * Set the OS Version of the protected item. + * + * @param osVersion the osVersion value to set + * @return the InMageReplicationDetails object itself. + */ + public InMageReplicationDetails withOsVersion(String osVersion) { + this.osVersion = osVersion; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageReprotectInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageReprotectInput.java new file mode 100644 index 0000000000000..e34ef4ef57214 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageReprotectInput.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * InMageAzureV2 specific provider input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMage") +public class InMageReprotectInput extends ReverseReplicationProviderSpecificInput { + /** + * The Master Target Id. + */ + @JsonProperty(value = "masterTargetId", required = true) + private String masterTargetId; + + /** + * The Process Server Id. + */ + @JsonProperty(value = "processServerId", required = true) + private String processServerId; + + /** + * The retention drive to use on the MT. + */ + @JsonProperty(value = "retentionDrive", required = true) + private String retentionDrive; + + /** + * The CS account Id. + */ + @JsonProperty(value = "runAsAccountId") + private String runAsAccountId; + + /** + * The target datastore name. + */ + @JsonProperty(value = "datastoreName") + private String datastoreName; + + /** + * The enable disk exclusion input. + */ + @JsonProperty(value = "diskExclusionInput") + private InMageDiskExclusionInput diskExclusionInput; + + /** + * The Policy Id. + */ + @JsonProperty(value = "profileId", required = true) + private String profileId; + + /** + * The disks to include list. + */ + @JsonProperty(value = "disksToInclude") + private List disksToInclude; + + /** + * Get the Master Target Id. + * + * @return the masterTargetId value + */ + public String masterTargetId() { + return this.masterTargetId; + } + + /** + * Set the Master Target Id. + * + * @param masterTargetId the masterTargetId value to set + * @return the InMageReprotectInput object itself. + */ + public InMageReprotectInput withMasterTargetId(String masterTargetId) { + this.masterTargetId = masterTargetId; + return this; + } + + /** + * Get the Process Server Id. + * + * @return the processServerId value + */ + public String processServerId() { + return this.processServerId; + } + + /** + * Set the Process Server Id. + * + * @param processServerId the processServerId value to set + * @return the InMageReprotectInput object itself. + */ + public InMageReprotectInput withProcessServerId(String processServerId) { + this.processServerId = processServerId; + return this; + } + + /** + * Get the retention drive to use on the MT. + * + * @return the retentionDrive value + */ + public String retentionDrive() { + return this.retentionDrive; + } + + /** + * Set the retention drive to use on the MT. + * + * @param retentionDrive the retentionDrive value to set + * @return the InMageReprotectInput object itself. + */ + public InMageReprotectInput withRetentionDrive(String retentionDrive) { + this.retentionDrive = retentionDrive; + return this; + } + + /** + * Get the CS account Id. + * + * @return the runAsAccountId value + */ + public String runAsAccountId() { + return this.runAsAccountId; + } + + /** + * Set the CS account Id. + * + * @param runAsAccountId the runAsAccountId value to set + * @return the InMageReprotectInput object itself. + */ + public InMageReprotectInput withRunAsAccountId(String runAsAccountId) { + this.runAsAccountId = runAsAccountId; + return this; + } + + /** + * Get the target datastore name. + * + * @return the datastoreName value + */ + public String datastoreName() { + return this.datastoreName; + } + + /** + * Set the target datastore name. + * + * @param datastoreName the datastoreName value to set + * @return the InMageReprotectInput object itself. + */ + public InMageReprotectInput withDatastoreName(String datastoreName) { + this.datastoreName = datastoreName; + return this; + } + + /** + * Get the enable disk exclusion input. + * + * @return the diskExclusionInput value + */ + public InMageDiskExclusionInput diskExclusionInput() { + return this.diskExclusionInput; + } + + /** + * Set the enable disk exclusion input. + * + * @param diskExclusionInput the diskExclusionInput value to set + * @return the InMageReprotectInput object itself. + */ + public InMageReprotectInput withDiskExclusionInput(InMageDiskExclusionInput diskExclusionInput) { + this.diskExclusionInput = diskExclusionInput; + return this; + } + + /** + * Get the Policy Id. + * + * @return the profileId value + */ + public String profileId() { + return this.profileId; + } + + /** + * Set the Policy Id. + * + * @param profileId the profileId value to set + * @return the InMageReprotectInput object itself. + */ + public InMageReprotectInput withProfileId(String profileId) { + this.profileId = profileId; + return this; + } + + /** + * Get the disks to include list. + * + * @return the disksToInclude value + */ + public List disksToInclude() { + return this.disksToInclude; + } + + /** + * Set the disks to include list. + * + * @param disksToInclude the disksToInclude value to set + * @return the InMageReprotectInput object itself. + */ + public InMageReprotectInput withDisksToInclude(List disksToInclude) { + this.disksToInclude = disksToInclude; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageV2RpRecoveryPointType.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageV2RpRecoveryPointType.java new file mode 100644 index 0000000000000..123b1fb098371 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageV2RpRecoveryPointType.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for InMageV2RpRecoveryPointType. + */ +public enum InMageV2RpRecoveryPointType { + /** Enum value Latest. */ + LATEST("Latest"), + + /** Enum value LatestApplicationConsistent. */ + LATEST_APPLICATION_CONSISTENT("LatestApplicationConsistent"), + + /** Enum value LatestCrashConsistent. */ + LATEST_CRASH_CONSISTENT("LatestCrashConsistent"), + + /** Enum value LatestProcessed. */ + LATEST_PROCESSED("LatestProcessed"); + + /** The actual serialized value for a InMageV2RpRecoveryPointType instance. */ + private String value; + + InMageV2RpRecoveryPointType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a InMageV2RpRecoveryPointType instance. + * + * @param value the serialized value to parse. + * @return the parsed InMageV2RpRecoveryPointType object, or null if unable to parse. + */ + @JsonCreator + public static InMageV2RpRecoveryPointType fromString(String value) { + InMageV2RpRecoveryPointType[] items = InMageV2RpRecoveryPointType.values(); + for (InMageV2RpRecoveryPointType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageVolumeExclusionOptions.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageVolumeExclusionOptions.java new file mode 100644 index 0000000000000..93cda2860fd1c --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InMageVolumeExclusionOptions.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Guest disk signature based disk exclusion option when doing enable + * protection of virtual machine in InMage provider. + */ +public class InMageVolumeExclusionOptions { + /** + * The volume label. The disk having any volume with this label will be + * excluded from replication. + */ + @JsonProperty(value = "volumeLabel") + private String volumeLabel; + + /** + * The value indicating whether to exclude multi volume disk or not. If a + * disk has multiple volumes and one of the volume has label matching with + * VolumeLabel this disk will be excluded from replication if + * OnlyExcludeIfSingleVolume is false. + */ + @JsonProperty(value = "OnlyExcludeIfSingleVolume") + private String onlyExcludeIfSingleVolume; + + /** + * Get the volume label. The disk having any volume with this label will be excluded from replication. + * + * @return the volumeLabel value + */ + public String volumeLabel() { + return this.volumeLabel; + } + + /** + * Set the volume label. The disk having any volume with this label will be excluded from replication. + * + * @param volumeLabel the volumeLabel value to set + * @return the InMageVolumeExclusionOptions object itself. + */ + public InMageVolumeExclusionOptions withVolumeLabel(String volumeLabel) { + this.volumeLabel = volumeLabel; + return this; + } + + /** + * Get the value indicating whether to exclude multi volume disk or not. If a disk has multiple volumes and one of the volume has label matching with VolumeLabel this disk will be excluded from replication if OnlyExcludeIfSingleVolume is false. + * + * @return the onlyExcludeIfSingleVolume value + */ + public String onlyExcludeIfSingleVolume() { + return this.onlyExcludeIfSingleVolume; + } + + /** + * Set the value indicating whether to exclude multi volume disk or not. If a disk has multiple volumes and one of the volume has label matching with VolumeLabel this disk will be excluded from replication if OnlyExcludeIfSingleVolume is false. + * + * @param onlyExcludeIfSingleVolume the onlyExcludeIfSingleVolume value to set + * @return the InMageVolumeExclusionOptions object itself. + */ + public InMageVolumeExclusionOptions withOnlyExcludeIfSingleVolume(String onlyExcludeIfSingleVolume) { + this.onlyExcludeIfSingleVolume = onlyExcludeIfSingleVolume; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InconsistentVmDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InconsistentVmDetails.java new file mode 100644 index 0000000000000..4c2dc7a35a465 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InconsistentVmDetails.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * This class stores the monitoring details for consistency check of + * inconsistent Protected Entity. + */ +public class InconsistentVmDetails { + /** + * The Vm name. + */ + @JsonProperty(value = "vmName") + private String vmName; + + /** + * The Cloud name. + */ + @JsonProperty(value = "cloudName") + private String cloudName; + + /** + * The list of details regarding state of the Protected Entity in SRS and + * On prem. + */ + @JsonProperty(value = "details") + private List details; + + /** + * The list of error ids. + */ + @JsonProperty(value = "errorIds") + private List errorIds; + + /** + * Get the Vm name. + * + * @return the vmName value + */ + public String vmName() { + return this.vmName; + } + + /** + * Set the Vm name. + * + * @param vmName the vmName value to set + * @return the InconsistentVmDetails object itself. + */ + public InconsistentVmDetails withVmName(String vmName) { + this.vmName = vmName; + return this; + } + + /** + * Get the Cloud name. + * + * @return the cloudName value + */ + public String cloudName() { + return this.cloudName; + } + + /** + * Set the Cloud name. + * + * @param cloudName the cloudName value to set + * @return the InconsistentVmDetails object itself. + */ + public InconsistentVmDetails withCloudName(String cloudName) { + this.cloudName = cloudName; + return this; + } + + /** + * Get the list of details regarding state of the Protected Entity in SRS and On prem. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set the list of details regarding state of the Protected Entity in SRS and On prem. + * + * @param details the details value to set + * @return the InconsistentVmDetails object itself. + */ + public InconsistentVmDetails withDetails(List details) { + this.details = details; + return this; + } + + /** + * Get the list of error ids. + * + * @return the errorIds value + */ + public List errorIds() { + return this.errorIds; + } + + /** + * Set the list of error ids. + * + * @param errorIds the errorIds value to set + * @return the InconsistentVmDetails object itself. + */ + public InconsistentVmDetails withErrorIds(List errorIds) { + this.errorIds = errorIds; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InitialReplicationDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InitialReplicationDetails.java new file mode 100644 index 0000000000000..5204bdfd15ae9 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InitialReplicationDetails.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Initial replication details. + */ +public class InitialReplicationDetails { + /** + * Initial replication type. + */ + @JsonProperty(value = "initialReplicationType") + private String initialReplicationType; + + /** + * The initial replication progress percentage. + */ + @JsonProperty(value = "initialReplicationProgressPercentage") + private String initialReplicationProgressPercentage; + + /** + * Get initial replication type. + * + * @return the initialReplicationType value + */ + public String initialReplicationType() { + return this.initialReplicationType; + } + + /** + * Set initial replication type. + * + * @param initialReplicationType the initialReplicationType value to set + * @return the InitialReplicationDetails object itself. + */ + public InitialReplicationDetails withInitialReplicationType(String initialReplicationType) { + this.initialReplicationType = initialReplicationType; + return this; + } + + /** + * Get the initial replication progress percentage. + * + * @return the initialReplicationProgressPercentage value + */ + public String initialReplicationProgressPercentage() { + return this.initialReplicationProgressPercentage; + } + + /** + * Set the initial replication progress percentage. + * + * @param initialReplicationProgressPercentage the initialReplicationProgressPercentage value to set + * @return the InitialReplicationDetails object itself. + */ + public InitialReplicationDetails withInitialReplicationProgressPercentage(String initialReplicationProgressPercentage) { + this.initialReplicationProgressPercentage = initialReplicationProgressPercentage; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InlineWorkflowTaskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InlineWorkflowTaskDetails.java new file mode 100644 index 0000000000000..f4da97cf59cb8 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InlineWorkflowTaskDetails.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * This class represents the inline workflow task details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InlineWorkflowTaskDetails") +public class InlineWorkflowTaskDetails extends GroupTaskDetails { + /** + * The list of child workflow ids. + */ + @JsonProperty(value = "workflowIds") + private List workflowIds; + + /** + * Get the list of child workflow ids. + * + * @return the workflowIds value + */ + public List workflowIds() { + return this.workflowIds; + } + + /** + * Set the list of child workflow ids. + * + * @param workflowIds the workflowIds value to set + * @return the InlineWorkflowTaskDetails object itself. + */ + public InlineWorkflowTaskDetails withWorkflowIds(List workflowIds) { + this.workflowIds = workflowIds; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InputEndpoint.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InputEndpoint.java new file mode 100644 index 0000000000000..c4c84af433e78 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/InputEndpoint.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure VM input endpoint details. + */ +public class InputEndpoint { + /** + * The input endpoint name. + */ + @JsonProperty(value = "endpointName") + private String endpointName; + + /** + * The input endpoint private port. + */ + @JsonProperty(value = "privatePort") + private Integer privatePort; + + /** + * The input endpoint public port. + */ + @JsonProperty(value = "publicPort") + private Integer publicPort; + + /** + * The input endpoint protocol. + */ + @JsonProperty(value = "protocol") + private String protocol; + + /** + * Get the input endpoint name. + * + * @return the endpointName value + */ + public String endpointName() { + return this.endpointName; + } + + /** + * Set the input endpoint name. + * + * @param endpointName the endpointName value to set + * @return the InputEndpoint object itself. + */ + public InputEndpoint withEndpointName(String endpointName) { + this.endpointName = endpointName; + return this; + } + + /** + * Get the input endpoint private port. + * + * @return the privatePort value + */ + public Integer privatePort() { + return this.privatePort; + } + + /** + * Set the input endpoint private port. + * + * @param privatePort the privatePort value to set + * @return the InputEndpoint object itself. + */ + public InputEndpoint withPrivatePort(Integer privatePort) { + this.privatePort = privatePort; + return this; + } + + /** + * Get the input endpoint public port. + * + * @return the publicPort value + */ + public Integer publicPort() { + return this.publicPort; + } + + /** + * Set the input endpoint public port. + * + * @param publicPort the publicPort value to set + * @return the InputEndpoint object itself. + */ + public InputEndpoint withPublicPort(Integer publicPort) { + this.publicPort = publicPort; + return this; + } + + /** + * Get the input endpoint protocol. + * + * @return the protocol value + */ + public String protocol() { + return this.protocol; + } + + /** + * Set the input endpoint protocol. + * + * @param protocol the protocol value to set + * @return the InputEndpoint object itself. + */ + public InputEndpoint withProtocol(String protocol) { + this.protocol = protocol; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Job.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Job.java new file mode 100644 index 0000000000000..8c466e243ed0a --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Job.java @@ -0,0 +1,67 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.JobInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; + +/** + * Type representing Job. + */ +public interface Job extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the endTime value. + */ + String endTime(); + + /** + * @return the error value. + */ + ARMException error(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + JobProperties properties(); + + /** + * @return the startTime value. + */ + String startTime(); + + /** + * @return the status value. + */ + String status(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobDetails.java new file mode 100644 index 0000000000000..a62243ba755c8 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobDetails.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Job details based on specific job type. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("JobDetails") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AsrJobDetails", value = AsrJobDetails.class), + @JsonSubTypes.Type(name = "TestFailoverJobDetails", value = TestFailoverJobDetails.class), + @JsonSubTypes.Type(name = "FailoverJobDetails", value = FailoverJobDetails.class), + @JsonSubTypes.Type(name = "ExportJobDetails", value = ExportJobDetails.class), + @JsonSubTypes.Type(name = "SwitchProtectionJobDetails", value = SwitchProtectionJobDetails.class) +}) +public class JobDetails { + /** + * The affected object properties like source server, source cloud, target + * server, target cloud etc. based on the workflow object details. + */ + @JsonProperty(value = "affectedObjectDetails") + private Map affectedObjectDetails; + + /** + * Get the affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. + * + * @return the affectedObjectDetails value + */ + public Map affectedObjectDetails() { + return this.affectedObjectDetails; + } + + /** + * Set the affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. + * + * @param affectedObjectDetails the affectedObjectDetails value to set + * @return the JobDetails object itself. + */ + public JobDetails withAffectedObjectDetails(Map affectedObjectDetails) { + this.affectedObjectDetails = affectedObjectDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobEntity.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobEntity.java new file mode 100644 index 0000000000000..0b89c67e9161b --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobEntity.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * This class contains the minimal job details required to navigate to the + * desired drill down. + */ +public class JobEntity { + /** + * The job id. + */ + @JsonProperty(value = "jobId") + private String jobId; + + /** + * The job display name. + */ + @JsonProperty(value = "jobFriendlyName") + private String jobFriendlyName; + + /** + * The object id. + */ + @JsonProperty(value = "targetObjectId") + private String targetObjectId; + + /** + * The object name. + */ + @JsonProperty(value = "targetObjectName") + private String targetObjectName; + + /** + * The workflow affected object type. + */ + @JsonProperty(value = "targetInstanceType") + private String targetInstanceType; + + /** + * The job name. Enum type ScenarioName. + */ + @JsonProperty(value = "jobScenarioName") + private String jobScenarioName; + + /** + * Get the job id. + * + * @return the jobId value + */ + public String jobId() { + return this.jobId; + } + + /** + * Set the job id. + * + * @param jobId the jobId value to set + * @return the JobEntity object itself. + */ + public JobEntity withJobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * Get the job display name. + * + * @return the jobFriendlyName value + */ + public String jobFriendlyName() { + return this.jobFriendlyName; + } + + /** + * Set the job display name. + * + * @param jobFriendlyName the jobFriendlyName value to set + * @return the JobEntity object itself. + */ + public JobEntity withJobFriendlyName(String jobFriendlyName) { + this.jobFriendlyName = jobFriendlyName; + return this; + } + + /** + * Get the object id. + * + * @return the targetObjectId value + */ + public String targetObjectId() { + return this.targetObjectId; + } + + /** + * Set the object id. + * + * @param targetObjectId the targetObjectId value to set + * @return the JobEntity object itself. + */ + public JobEntity withTargetObjectId(String targetObjectId) { + this.targetObjectId = targetObjectId; + return this; + } + + /** + * Get the object name. + * + * @return the targetObjectName value + */ + public String targetObjectName() { + return this.targetObjectName; + } + + /** + * Set the object name. + * + * @param targetObjectName the targetObjectName value to set + * @return the JobEntity object itself. + */ + public JobEntity withTargetObjectName(String targetObjectName) { + this.targetObjectName = targetObjectName; + return this; + } + + /** + * Get the workflow affected object type. + * + * @return the targetInstanceType value + */ + public String targetInstanceType() { + return this.targetInstanceType; + } + + /** + * Set the workflow affected object type. + * + * @param targetInstanceType the targetInstanceType value to set + * @return the JobEntity object itself. + */ + public JobEntity withTargetInstanceType(String targetInstanceType) { + this.targetInstanceType = targetInstanceType; + return this; + } + + /** + * Get the job name. Enum type ScenarioName. + * + * @return the jobScenarioName value + */ + public String jobScenarioName() { + return this.jobScenarioName; + } + + /** + * Set the job name. Enum type ScenarioName. + * + * @param jobScenarioName the jobScenarioName value to set + * @return the JobEntity object itself. + */ + public JobEntity withJobScenarioName(String jobScenarioName) { + this.jobScenarioName = jobScenarioName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobErrorDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobErrorDetails.java new file mode 100644 index 0000000000000..3e9870af03898 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobErrorDetails.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.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * This class contains the error details per object. + */ +public class JobErrorDetails { + /** + * The Service error details. + */ + @JsonProperty(value = "serviceErrorDetails") + private ServiceError serviceErrorDetails; + + /** + * The Provider error details. + */ + @JsonProperty(value = "providerErrorDetails") + private ProviderError providerErrorDetails; + + /** + * Error level of error. + */ + @JsonProperty(value = "errorLevel") + private String errorLevel; + + /** + * The creation time of job error. + */ + @JsonProperty(value = "creationTime") + private DateTime creationTime; + + /** + * The Id of the task. + */ + @JsonProperty(value = "taskId") + private String taskId; + + /** + * Get the Service error details. + * + * @return the serviceErrorDetails value + */ + public ServiceError serviceErrorDetails() { + return this.serviceErrorDetails; + } + + /** + * Set the Service error details. + * + * @param serviceErrorDetails the serviceErrorDetails value to set + * @return the JobErrorDetails object itself. + */ + public JobErrorDetails withServiceErrorDetails(ServiceError serviceErrorDetails) { + this.serviceErrorDetails = serviceErrorDetails; + return this; + } + + /** + * Get the Provider error details. + * + * @return the providerErrorDetails value + */ + public ProviderError providerErrorDetails() { + return this.providerErrorDetails; + } + + /** + * Set the Provider error details. + * + * @param providerErrorDetails the providerErrorDetails value to set + * @return the JobErrorDetails object itself. + */ + public JobErrorDetails withProviderErrorDetails(ProviderError providerErrorDetails) { + this.providerErrorDetails = providerErrorDetails; + return this; + } + + /** + * Get error level of error. + * + * @return the errorLevel value + */ + public String errorLevel() { + return this.errorLevel; + } + + /** + * Set error level of error. + * + * @param errorLevel the errorLevel value to set + * @return the JobErrorDetails object itself. + */ + public JobErrorDetails withErrorLevel(String errorLevel) { + this.errorLevel = errorLevel; + return this; + } + + /** + * Get the creation time of job error. + * + * @return the creationTime value + */ + public DateTime creationTime() { + return this.creationTime; + } + + /** + * Set the creation time of job error. + * + * @param creationTime the creationTime value to set + * @return the JobErrorDetails object itself. + */ + public JobErrorDetails withCreationTime(DateTime creationTime) { + this.creationTime = creationTime; + return this; + } + + /** + * Get the Id of the task. + * + * @return the taskId value + */ + public String taskId() { + return this.taskId; + } + + /** + * Set the Id of the task. + * + * @param taskId the taskId value to set + * @return the JobErrorDetails object itself. + */ + public JobErrorDetails withTaskId(String taskId) { + this.taskId = taskId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobProperties.java new file mode 100644 index 0000000000000..e22d32c8830e3 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobProperties.java @@ -0,0 +1,387 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Job custom data details. + */ +public class JobProperties { + /** + * The activity id. + */ + @JsonProperty(value = "activityId") + private String activityId; + + /** + * The ScenarioName. + */ + @JsonProperty(value = "scenarioName") + private String scenarioName; + + /** + * The DisplayName. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * The status of the Job. It is one of these values - NotStarted, + * InProgress, Succeeded, Failed, Cancelled, Suspended or Other. + */ + @JsonProperty(value = "state") + private String state; + + /** + * The description of the state of the Job. For e.g. - For Succeeded state, + * description can be Completed, PartiallySucceeded, + * CompletedWithInformation or Skipped. + */ + @JsonProperty(value = "stateDescription") + private String stateDescription; + + /** + * The tasks. + */ + @JsonProperty(value = "tasks") + private List tasks; + + /** + * The errors. + */ + @JsonProperty(value = "errors") + private List errors; + + /** + * The start time. + */ + @JsonProperty(value = "startTime") + private DateTime startTime; + + /** + * The end time. + */ + @JsonProperty(value = "endTime") + private DateTime endTime; + + /** + * The Allowed action the job. + */ + @JsonProperty(value = "allowedActions") + private List allowedActions; + + /** + * The affected Object Id. + */ + @JsonProperty(value = "targetObjectId") + private String targetObjectId; + + /** + * The name of the affected object. + */ + @JsonProperty(value = "targetObjectName") + private String targetObjectName; + + /** + * The type of the affected object which is of + * {Microsoft.Azure.SiteRecovery.V2015_11_10.AffectedObjectType} class. + */ + @JsonProperty(value = "targetInstanceType") + private String targetInstanceType; + + /** + * The custom job details like test failover job details. + */ + @JsonProperty(value = "customDetails") + private JobDetails customDetails; + + /** + * Get the activity id. + * + * @return the activityId value + */ + public String activityId() { + return this.activityId; + } + + /** + * Set the activity id. + * + * @param activityId the activityId value to set + * @return the JobProperties object itself. + */ + public JobProperties withActivityId(String activityId) { + this.activityId = activityId; + return this; + } + + /** + * Get the ScenarioName. + * + * @return the scenarioName value + */ + public String scenarioName() { + return this.scenarioName; + } + + /** + * Set the ScenarioName. + * + * @param scenarioName the scenarioName value to set + * @return the JobProperties object itself. + */ + public JobProperties withScenarioName(String scenarioName) { + this.scenarioName = scenarioName; + return this; + } + + /** + * Get the DisplayName. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the DisplayName. + * + * @param friendlyName the friendlyName value to set + * @return the JobProperties object itself. + */ + public JobProperties withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the status of the Job. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Set the status of the Job. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. + * + * @param state the state value to set + * @return the JobProperties object itself. + */ + public JobProperties withState(String state) { + this.state = state; + return this; + } + + /** + * Get the description of the state of the Job. For e.g. - For Succeeded state, description can be Completed, PartiallySucceeded, CompletedWithInformation or Skipped. + * + * @return the stateDescription value + */ + public String stateDescription() { + return this.stateDescription; + } + + /** + * Set the description of the state of the Job. For e.g. - For Succeeded state, description can be Completed, PartiallySucceeded, CompletedWithInformation or Skipped. + * + * @param stateDescription the stateDescription value to set + * @return the JobProperties object itself. + */ + public JobProperties withStateDescription(String stateDescription) { + this.stateDescription = stateDescription; + return this; + } + + /** + * Get the tasks. + * + * @return the tasks value + */ + public List tasks() { + return this.tasks; + } + + /** + * Set the tasks. + * + * @param tasks the tasks value to set + * @return the JobProperties object itself. + */ + public JobProperties withTasks(List tasks) { + this.tasks = tasks; + return this; + } + + /** + * Get the errors. + * + * @return the errors value + */ + public List errors() { + return this.errors; + } + + /** + * Set the errors. + * + * @param errors the errors value to set + * @return the JobProperties object itself. + */ + public JobProperties withErrors(List errors) { + this.errors = errors; + return this; + } + + /** + * Get the start time. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the start time. + * + * @param startTime the startTime value to set + * @return the JobProperties object itself. + */ + public JobProperties withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the end time. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set the end time. + * + * @param endTime the endTime value to set + * @return the JobProperties object itself. + */ + public JobProperties withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the Allowed action the job. + * + * @return the allowedActions value + */ + public List allowedActions() { + return this.allowedActions; + } + + /** + * Set the Allowed action the job. + * + * @param allowedActions the allowedActions value to set + * @return the JobProperties object itself. + */ + public JobProperties withAllowedActions(List allowedActions) { + this.allowedActions = allowedActions; + return this; + } + + /** + * Get the affected Object Id. + * + * @return the targetObjectId value + */ + public String targetObjectId() { + return this.targetObjectId; + } + + /** + * Set the affected Object Id. + * + * @param targetObjectId the targetObjectId value to set + * @return the JobProperties object itself. + */ + public JobProperties withTargetObjectId(String targetObjectId) { + this.targetObjectId = targetObjectId; + return this; + } + + /** + * Get the name of the affected object. + * + * @return the targetObjectName value + */ + public String targetObjectName() { + return this.targetObjectName; + } + + /** + * Set the name of the affected object. + * + * @param targetObjectName the targetObjectName value to set + * @return the JobProperties object itself. + */ + public JobProperties withTargetObjectName(String targetObjectName) { + this.targetObjectName = targetObjectName; + return this; + } + + /** + * Get the type of the affected object which is of {Microsoft.Azure.SiteRecovery.V2015_11_10.AffectedObjectType} class. + * + * @return the targetInstanceType value + */ + public String targetInstanceType() { + return this.targetInstanceType; + } + + /** + * Set the type of the affected object which is of {Microsoft.Azure.SiteRecovery.V2015_11_10.AffectedObjectType} class. + * + * @param targetInstanceType the targetInstanceType value to set + * @return the JobProperties object itself. + */ + public JobProperties withTargetInstanceType(String targetInstanceType) { + this.targetInstanceType = targetInstanceType; + return this; + } + + /** + * Get the custom job details like test failover job details. + * + * @return the customDetails value + */ + public JobDetails customDetails() { + return this.customDetails; + } + + /** + * Set the custom job details like test failover job details. + * + * @param customDetails the customDetails value to set + * @return the JobProperties object itself. + */ + public JobProperties withCustomDetails(JobDetails customDetails) { + this.customDetails = customDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobQueryParameter.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobQueryParameter.java new file mode 100644 index 0000000000000..7047b018f1e33 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobQueryParameter.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Query parameter to enumerate jobs. + */ +public class JobQueryParameter { + /** + * Date time to get jobs from. + */ + @JsonProperty(value = "startTime") + private String startTime; + + /** + * Date time to get jobs upto. + */ + @JsonProperty(value = "endTime") + private String endTime; + + /** + * The Id of the fabric to search jobs under. + */ + @JsonProperty(value = "fabricId") + private String fabricId; + + /** + * The type of objects. + */ + @JsonProperty(value = "affectedObjectTypes") + private List affectedObjectTypes; + + /** + * The states of the job to be filtered can be in. + */ + @JsonProperty(value = "jobStatus") + private List jobStatus; + + /** + * Get date time to get jobs from. + * + * @return the startTime value + */ + public String startTime() { + return this.startTime; + } + + /** + * Set date time to get jobs from. + * + * @param startTime the startTime value to set + * @return the JobQueryParameter object itself. + */ + public JobQueryParameter withStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get date time to get jobs upto. + * + * @return the endTime value + */ + public String endTime() { + return this.endTime; + } + + /** + * Set date time to get jobs upto. + * + * @param endTime the endTime value to set + * @return the JobQueryParameter object itself. + */ + public JobQueryParameter withEndTime(String endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the Id of the fabric to search jobs under. + * + * @return the fabricId value + */ + public String fabricId() { + return this.fabricId; + } + + /** + * Set the Id of the fabric to search jobs under. + * + * @param fabricId the fabricId value to set + * @return the JobQueryParameter object itself. + */ + public JobQueryParameter withFabricId(String fabricId) { + this.fabricId = fabricId; + return this; + } + + /** + * Get the type of objects. + * + * @return the affectedObjectTypes value + */ + public List affectedObjectTypes() { + return this.affectedObjectTypes; + } + + /** + * Set the type of objects. + * + * @param affectedObjectTypes the affectedObjectTypes value to set + * @return the JobQueryParameter object itself. + */ + public JobQueryParameter withAffectedObjectTypes(List affectedObjectTypes) { + this.affectedObjectTypes = affectedObjectTypes; + return this; + } + + /** + * Get the states of the job to be filtered can be in. + * + * @return the jobStatus value + */ + public List jobStatus() { + return this.jobStatus; + } + + /** + * Set the states of the job to be filtered can be in. + * + * @param jobStatus the jobStatus value to set + * @return the JobQueryParameter object itself. + */ + public JobQueryParameter withJobStatus(List jobStatus) { + this.jobStatus = jobStatus; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobStatusEventDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobStatusEventDetails.java new file mode 100644 index 0000000000000..e64511de38ed2 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobStatusEventDetails.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Model class for event details of a job status event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("JobStatus") +public class JobStatusEventDetails extends EventSpecificDetails { + /** + * Job arm id for the event. + */ + @JsonProperty(value = "jobId") + private String jobId; + + /** + * JobName for the Event. + */ + @JsonProperty(value = "jobFriendlyName") + private String jobFriendlyName; + + /** + * JobStatus for the Event. + */ + @JsonProperty(value = "jobStatus") + private String jobStatus; + + /** + * AffectedObjectType for the event. + */ + @JsonProperty(value = "affectedObjectType") + private String affectedObjectType; + + /** + * Get job arm id for the event. + * + * @return the jobId value + */ + public String jobId() { + return this.jobId; + } + + /** + * Set job arm id for the event. + * + * @param jobId the jobId value to set + * @return the JobStatusEventDetails object itself. + */ + public JobStatusEventDetails withJobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * Get jobName for the Event. + * + * @return the jobFriendlyName value + */ + public String jobFriendlyName() { + return this.jobFriendlyName; + } + + /** + * Set jobName for the Event. + * + * @param jobFriendlyName the jobFriendlyName value to set + * @return the JobStatusEventDetails object itself. + */ + public JobStatusEventDetails withJobFriendlyName(String jobFriendlyName) { + this.jobFriendlyName = jobFriendlyName; + return this; + } + + /** + * Get jobStatus for the Event. + * + * @return the jobStatus value + */ + public String jobStatus() { + return this.jobStatus; + } + + /** + * Set jobStatus for the Event. + * + * @param jobStatus the jobStatus value to set + * @return the JobStatusEventDetails object itself. + */ + public JobStatusEventDetails withJobStatus(String jobStatus) { + this.jobStatus = jobStatus; + return this; + } + + /** + * Get affectedObjectType for the event. + * + * @return the affectedObjectType value + */ + public String affectedObjectType() { + return this.affectedObjectType; + } + + /** + * Set affectedObjectType for the event. + * + * @param affectedObjectType the affectedObjectType value to set + * @return the JobStatusEventDetails object itself. + */ + public JobStatusEventDetails withAffectedObjectType(String affectedObjectType) { + this.affectedObjectType = affectedObjectType; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobTaskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobTaskDetails.java new file mode 100644 index 0000000000000..200a4d822e527 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/JobTaskDetails.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * This class represents a task which is actually a workflow so that one can + * navigate to its individual drill down. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("JobTaskDetails") +public class JobTaskDetails extends TaskTypeDetails { + /** + * The job entity. + */ + @JsonProperty(value = "jobTask") + private JobEntity jobTask; + + /** + * Get the job entity. + * + * @return the jobTask value + */ + public JobEntity jobTask() { + return this.jobTask; + } + + /** + * Set the job entity. + * + * @param jobTask the jobTask value to set + * @return the JobTaskDetails object itself. + */ + public JobTaskDetails withJobTask(JobEntity jobTask) { + this.jobTask = jobTask; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/LicenseType.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/LicenseType.java new file mode 100644 index 0000000000000..8a7fd29e93d8e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/LicenseType.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for LicenseType. + */ +public enum LicenseType { + /** Enum value NotSpecified. */ + NOT_SPECIFIED("NotSpecified"), + + /** Enum value NoLicenseType. */ + NO_LICENSE_TYPE("NoLicenseType"), + + /** Enum value WindowsServer. */ + WINDOWS_SERVER("WindowsServer"); + + /** The actual serialized value for a LicenseType instance. */ + private String value; + + LicenseType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a LicenseType instance. + * + * @param value the serialized value to parse. + * @return the parsed LicenseType object, or null if unable to parse. + */ + @JsonCreator + public static LicenseType fromString(String value) { + LicenseType[] items = LicenseType.values(); + for (LicenseType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/LogicalNetwork.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/LogicalNetwork.java new file mode 100644 index 0000000000000..3adaeea0d0cda --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/LogicalNetwork.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.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.LogicalNetworkInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; + +/** + * Type representing LogicalNetwork. + */ +public interface LogicalNetwork extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + LogicalNetworkProperties properties(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/LogicalNetworkProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/LogicalNetworkProperties.java new file mode 100644 index 0000000000000..32d7c1ec8af1a --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/LogicalNetworkProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Logical Network Properties. + */ +public class LogicalNetworkProperties { + /** + * The Friendly Name. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * A value indicating whether Network Virtualization is enabled for the + * logical network. + */ + @JsonProperty(value = "networkVirtualizationStatus") + private String networkVirtualizationStatus; + + /** + * A value indicating whether logical network is used as private test + * network by test failover. + */ + @JsonProperty(value = "logicalNetworkUsage") + private String logicalNetworkUsage; + + /** + * A value indicating whether logical network definitions are isolated. + */ + @JsonProperty(value = "logicalNetworkDefinitionsStatus") + private String logicalNetworkDefinitionsStatus; + + /** + * Get the Friendly Name. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the Friendly Name. + * + * @param friendlyName the friendlyName value to set + * @return the LogicalNetworkProperties object itself. + */ + public LogicalNetworkProperties withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get a value indicating whether Network Virtualization is enabled for the logical network. + * + * @return the networkVirtualizationStatus value + */ + public String networkVirtualizationStatus() { + return this.networkVirtualizationStatus; + } + + /** + * Set a value indicating whether Network Virtualization is enabled for the logical network. + * + * @param networkVirtualizationStatus the networkVirtualizationStatus value to set + * @return the LogicalNetworkProperties object itself. + */ + public LogicalNetworkProperties withNetworkVirtualizationStatus(String networkVirtualizationStatus) { + this.networkVirtualizationStatus = networkVirtualizationStatus; + return this; + } + + /** + * Get a value indicating whether logical network is used as private test network by test failover. + * + * @return the logicalNetworkUsage value + */ + public String logicalNetworkUsage() { + return this.logicalNetworkUsage; + } + + /** + * Set a value indicating whether logical network is used as private test network by test failover. + * + * @param logicalNetworkUsage the logicalNetworkUsage value to set + * @return the LogicalNetworkProperties object itself. + */ + public LogicalNetworkProperties withLogicalNetworkUsage(String logicalNetworkUsage) { + this.logicalNetworkUsage = logicalNetworkUsage; + return this; + } + + /** + * Get a value indicating whether logical network definitions are isolated. + * + * @return the logicalNetworkDefinitionsStatus value + */ + public String logicalNetworkDefinitionsStatus() { + return this.logicalNetworkDefinitionsStatus; + } + + /** + * Set a value indicating whether logical network definitions are isolated. + * + * @param logicalNetworkDefinitionsStatus the logicalNetworkDefinitionsStatus value to set + * @return the LogicalNetworkProperties object itself. + */ + public LogicalNetworkProperties withLogicalNetworkDefinitionsStatus(String logicalNetworkDefinitionsStatus) { + this.logicalNetworkDefinitionsStatus = logicalNetworkDefinitionsStatus; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ManualActionTaskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ManualActionTaskDetails.java new file mode 100644 index 0000000000000..a761cdc2cb40d --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ManualActionTaskDetails.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * This class represents the manual action task details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("ManualActionTaskDetails") +public class ManualActionTaskDetails extends TaskTypeDetails { + /** + * The name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The instructions. + */ + @JsonProperty(value = "instructions") + private String instructions; + + /** + * The observation. + */ + @JsonProperty(value = "observation") + private String observation; + + /** + * Get the name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name. + * + * @param name the name value to set + * @return the ManualActionTaskDetails object itself. + */ + public ManualActionTaskDetails withName(String name) { + this.name = name; + return this; + } + + /** + * Get the instructions. + * + * @return the instructions value + */ + public String instructions() { + return this.instructions; + } + + /** + * Set the instructions. + * + * @param instructions the instructions value to set + * @return the ManualActionTaskDetails object itself. + */ + public ManualActionTaskDetails withInstructions(String instructions) { + this.instructions = instructions; + return this; + } + + /** + * Get the observation. + * + * @return the observation value + */ + public String observation() { + return this.observation; + } + + /** + * Set the observation. + * + * @param observation the observation value to set + * @return the ManualActionTaskDetails object itself. + */ + public ManualActionTaskDetails withObservation(String observation) { + this.observation = observation; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/MasterTargetServer.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/MasterTargetServer.java new file mode 100644 index 0000000000000..27fa5fa82ecb1 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/MasterTargetServer.java @@ -0,0 +1,331 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of a Master Target Server. + */ +public class MasterTargetServer { + /** + * The server Id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The IP address of the server. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * The server name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The OS type of the server. + */ + @JsonProperty(value = "osType") + private String osType; + + /** + * The version of the scout component on the server. + */ + @JsonProperty(value = "agentVersion") + private String agentVersion; + + /** + * The last heartbeat received from the server. + */ + @JsonProperty(value = "lastHeartbeat") + private DateTime lastHeartbeat; + + /** + * Version status. + */ + @JsonProperty(value = "versionStatus") + private String versionStatus; + + /** + * The retention volumes of Master target Server. + */ + @JsonProperty(value = "retentionVolumes") + private List retentionVolumes; + + /** + * The list of data stores in the fabric. + */ + @JsonProperty(value = "dataStores") + private List dataStores; + + /** + * Validation errors. + */ + @JsonProperty(value = "validationErrors") + private List validationErrors; + + /** + * Disk count of the master target. + */ + @JsonProperty(value = "diskCount") + private Integer diskCount; + + /** + * OS Version of the master target. + */ + @JsonProperty(value = "osVersion") + private String osVersion; + + /** + * Get the server Id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the server Id. + * + * @param id the id value to set + * @return the MasterTargetServer object itself. + */ + public MasterTargetServer withId(String id) { + this.id = id; + return this; + } + + /** + * Get the IP address of the server. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the IP address of the server. + * + * @param ipAddress the ipAddress value to set + * @return the MasterTargetServer object itself. + */ + public MasterTargetServer withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the server name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the server name. + * + * @param name the name value to set + * @return the MasterTargetServer object itself. + */ + public MasterTargetServer withName(String name) { + this.name = name; + return this; + } + + /** + * Get the OS type of the server. + * + * @return the osType value + */ + public String osType() { + return this.osType; + } + + /** + * Set the OS type of the server. + * + * @param osType the osType value to set + * @return the MasterTargetServer object itself. + */ + public MasterTargetServer withOsType(String osType) { + this.osType = osType; + return this; + } + + /** + * Get the version of the scout component on the server. + * + * @return the agentVersion value + */ + public String agentVersion() { + return this.agentVersion; + } + + /** + * Set the version of the scout component on the server. + * + * @param agentVersion the agentVersion value to set + * @return the MasterTargetServer object itself. + */ + public MasterTargetServer withAgentVersion(String agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + /** + * Get the last heartbeat received from the server. + * + * @return the lastHeartbeat value + */ + public DateTime lastHeartbeat() { + return this.lastHeartbeat; + } + + /** + * Set the last heartbeat received from the server. + * + * @param lastHeartbeat the lastHeartbeat value to set + * @return the MasterTargetServer object itself. + */ + public MasterTargetServer withLastHeartbeat(DateTime lastHeartbeat) { + this.lastHeartbeat = lastHeartbeat; + return this; + } + + /** + * Get version status. + * + * @return the versionStatus value + */ + public String versionStatus() { + return this.versionStatus; + } + + /** + * Set version status. + * + * @param versionStatus the versionStatus value to set + * @return the MasterTargetServer object itself. + */ + public MasterTargetServer withVersionStatus(String versionStatus) { + this.versionStatus = versionStatus; + return this; + } + + /** + * Get the retention volumes of Master target Server. + * + * @return the retentionVolumes value + */ + public List retentionVolumes() { + return this.retentionVolumes; + } + + /** + * Set the retention volumes of Master target Server. + * + * @param retentionVolumes the retentionVolumes value to set + * @return the MasterTargetServer object itself. + */ + public MasterTargetServer withRetentionVolumes(List retentionVolumes) { + this.retentionVolumes = retentionVolumes; + return this; + } + + /** + * Get the list of data stores in the fabric. + * + * @return the dataStores value + */ + public List dataStores() { + return this.dataStores; + } + + /** + * Set the list of data stores in the fabric. + * + * @param dataStores the dataStores value to set + * @return the MasterTargetServer object itself. + */ + public MasterTargetServer withDataStores(List dataStores) { + this.dataStores = dataStores; + return this; + } + + /** + * Get validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + + /** + * Set validation errors. + * + * @param validationErrors the validationErrors value to set + * @return the MasterTargetServer object itself. + */ + public MasterTargetServer withValidationErrors(List validationErrors) { + this.validationErrors = validationErrors; + return this; + } + + /** + * Get disk count of the master target. + * + * @return the diskCount value + */ + public Integer diskCount() { + return this.diskCount; + } + + /** + * Set disk count of the master target. + * + * @param diskCount the diskCount value to set + * @return the MasterTargetServer object itself. + */ + public MasterTargetServer withDiskCount(Integer diskCount) { + this.diskCount = diskCount; + return this; + } + + /** + * Get oS Version of the master target. + * + * @return the osVersion value + */ + public String osVersion() { + return this.osVersion; + } + + /** + * Set oS Version of the master target. + * + * @param osVersion the osVersion value to set + * @return the MasterTargetServer object itself. + */ + public MasterTargetServer withOsVersion(String osVersion) { + this.osVersion = osVersion; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/MethodCallStatus.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/MethodCallStatus.java new file mode 100644 index 0000000000000..b53aad6593436 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/MethodCallStatus.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Reports method status where exception was raised. + */ +public class MethodCallStatus { + /** + * Gets a value indicating whether called method was virtual. + */ + @JsonProperty(value = "isVirtual") + private String isVirtual; + + /** + * Gets parameter list passed to method. + */ + @JsonProperty(value = "parameters") + private List parameters; + + /** + * Gets a value indicating whether method container generic params. + */ + @JsonProperty(value = "containsGenericParameters") + private String containsGenericParameters; + + /** + * Get gets a value indicating whether called method was virtual. + * + * @return the isVirtual value + */ + public String isVirtual() { + return this.isVirtual; + } + + /** + * Set gets a value indicating whether called method was virtual. + * + * @param isVirtual the isVirtual value to set + * @return the MethodCallStatus object itself. + */ + public MethodCallStatus withIsVirtual(String isVirtual) { + this.isVirtual = isVirtual; + return this; + } + + /** + * Get gets parameter list passed to method. + * + * @return the parameters value + */ + public List parameters() { + return this.parameters; + } + + /** + * Set gets parameter list passed to method. + * + * @param parameters the parameters value to set + * @return the MethodCallStatus object itself. + */ + public MethodCallStatus withParameters(List parameters) { + this.parameters = parameters; + return this; + } + + /** + * Get gets a value indicating whether method container generic params. + * + * @return the containsGenericParameters value + */ + public String containsGenericParameters() { + return this.containsGenericParameters; + } + + /** + * Set gets a value indicating whether method container generic params. + * + * @param containsGenericParameters the containsGenericParameters value to set + * @return the MethodCallStatus object itself. + */ + public MethodCallStatus withContainsGenericParameters(String containsGenericParameters) { + this.containsGenericParameters = containsGenericParameters; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/MobilityServiceUpdate.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/MobilityServiceUpdate.java new file mode 100644 index 0000000000000..12ae5faa13461 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/MobilityServiceUpdate.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Mobility Service update details. + */ +public class MobilityServiceUpdate { + /** + * The version of the latest update. + */ + @JsonProperty(value = "version") + private String version; + + /** + * The reboot status of the update - whether it is required or not. + */ + @JsonProperty(value = "rebootStatus") + private String rebootStatus; + + /** + * The OS type. + */ + @JsonProperty(value = "osType") + private String osType; + + /** + * Get the version of the latest update. + * + * @return the version value + */ + public String version() { + return this.version; + } + + /** + * Set the version of the latest update. + * + * @param version the version value to set + * @return the MobilityServiceUpdate object itself. + */ + public MobilityServiceUpdate withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the reboot status of the update - whether it is required or not. + * + * @return the rebootStatus value + */ + public String rebootStatus() { + return this.rebootStatus; + } + + /** + * Set the reboot status of the update - whether it is required or not. + * + * @param rebootStatus the rebootStatus value to set + * @return the MobilityServiceUpdate object itself. + */ + public MobilityServiceUpdate withRebootStatus(String rebootStatus) { + this.rebootStatus = rebootStatus; + return this; + } + + /** + * Get the OS type. + * + * @return the osType value + */ + public String osType() { + return this.osType; + } + + /** + * Set the OS type. + * + * @param osType the osType value to set + * @return the MobilityServiceUpdate object itself. + */ + public MobilityServiceUpdate withOsType(String osType) { + this.osType = osType; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/MultiVmSyncStatus.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/MultiVmSyncStatus.java new file mode 100644 index 0000000000000..a15dd2ba1dddb --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/MultiVmSyncStatus.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for MultiVmSyncStatus. + */ +public enum MultiVmSyncStatus { + /** Enum value Enabled. */ + ENABLED("Enabled"), + + /** Enum value Disabled. */ + DISABLED("Disabled"); + + /** The actual serialized value for a MultiVmSyncStatus instance. */ + private String value; + + MultiVmSyncStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a MultiVmSyncStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed MultiVmSyncStatus object, or null if unable to parse. + */ + @JsonCreator + public static MultiVmSyncStatus fromString(String value) { + MultiVmSyncStatus[] items = MultiVmSyncStatus.values(); + for (MultiVmSyncStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Network.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Network.java new file mode 100644 index 0000000000000..66e86b754e8b9 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Network.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.NetworkInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; + +/** + * Type representing Network. + */ +public interface Network extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + NetworkProperties properties(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/NetworkMapping.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/NetworkMapping.java new file mode 100644 index 0000000000000..ee34fe203cd77 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/NetworkMapping.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.NetworkMappingInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; + +/** + * Type representing NetworkMapping. + */ +public interface NetworkMapping extends HasInner, Indexable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + NetworkMappingProperties properties(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the NetworkMapping definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithVault, DefinitionStages.WithCreate { + } + + /** + * Grouping of NetworkMapping definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a NetworkMapping definition. + */ + interface Blank extends WithVault { + } + + /** + * The stage of the networkmapping definition allowing to specify Vault. + */ + interface WithVault { + /** + * Specifies fabricName, networkName. + */ + WithCreate withExistingVault(String fabricName, String networkName); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a NetworkMapping update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable { + } + + /** + * Grouping of NetworkMapping update stages. + */ + interface UpdateStages { + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/NetworkMappingFabricSpecificSettings.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/NetworkMappingFabricSpecificSettings.java new file mode 100644 index 0000000000000..e3892fc4d9c54 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/NetworkMappingFabricSpecificSettings.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Network Mapping fabric specific settings. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("NetworkMappingFabricSpecificSettings") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AzureToAzure", value = AzureToAzureNetworkMappingSettings.class), + @JsonSubTypes.Type(name = "VmmToAzure", value = VmmToAzureNetworkMappingSettings.class), + @JsonSubTypes.Type(name = "VmmToVmm", value = VmmToVmmNetworkMappingSettings.class) +}) +public class NetworkMappingFabricSpecificSettings { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/NetworkMappingProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/NetworkMappingProperties.java new file mode 100644 index 0000000000000..84ef8b0e27baf --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/NetworkMappingProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Network Mapping Properties. + */ +public class NetworkMappingProperties { + /** + * The pairing state for network mapping. + */ + @JsonProperty(value = "state") + private String state; + + /** + * The primary network friendly name. + */ + @JsonProperty(value = "primaryNetworkFriendlyName") + private String primaryNetworkFriendlyName; + + /** + * The primary network id for network mapping. + */ + @JsonProperty(value = "primaryNetworkId") + private String primaryNetworkId; + + /** + * The primary fabric friendly name. + */ + @JsonProperty(value = "primaryFabricFriendlyName") + private String primaryFabricFriendlyName; + + /** + * The recovery network friendly name. + */ + @JsonProperty(value = "recoveryNetworkFriendlyName") + private String recoveryNetworkFriendlyName; + + /** + * The recovery network id for network mapping. + */ + @JsonProperty(value = "recoveryNetworkId") + private String recoveryNetworkId; + + /** + * The recovery fabric ARM id. + */ + @JsonProperty(value = "recoveryFabricArmId") + private String recoveryFabricArmId; + + /** + * The recovery fabric friendly name. + */ + @JsonProperty(value = "recoveryFabricFriendlyName") + private String recoveryFabricFriendlyName; + + /** + * The fabric specific settings. + */ + @JsonProperty(value = "fabricSpecificSettings") + private NetworkMappingFabricSpecificSettings fabricSpecificSettings; + + /** + * Get the pairing state for network mapping. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Set the pairing state for network mapping. + * + * @param state the state value to set + * @return the NetworkMappingProperties object itself. + */ + public NetworkMappingProperties withState(String state) { + this.state = state; + return this; + } + + /** + * Get the primary network friendly name. + * + * @return the primaryNetworkFriendlyName value + */ + public String primaryNetworkFriendlyName() { + return this.primaryNetworkFriendlyName; + } + + /** + * Set the primary network friendly name. + * + * @param primaryNetworkFriendlyName the primaryNetworkFriendlyName value to set + * @return the NetworkMappingProperties object itself. + */ + public NetworkMappingProperties withPrimaryNetworkFriendlyName(String primaryNetworkFriendlyName) { + this.primaryNetworkFriendlyName = primaryNetworkFriendlyName; + return this; + } + + /** + * Get the primary network id for network mapping. + * + * @return the primaryNetworkId value + */ + public String primaryNetworkId() { + return this.primaryNetworkId; + } + + /** + * Set the primary network id for network mapping. + * + * @param primaryNetworkId the primaryNetworkId value to set + * @return the NetworkMappingProperties object itself. + */ + public NetworkMappingProperties withPrimaryNetworkId(String primaryNetworkId) { + this.primaryNetworkId = primaryNetworkId; + return this; + } + + /** + * Get the primary fabric friendly name. + * + * @return the primaryFabricFriendlyName value + */ + public String primaryFabricFriendlyName() { + return this.primaryFabricFriendlyName; + } + + /** + * Set the primary fabric friendly name. + * + * @param primaryFabricFriendlyName the primaryFabricFriendlyName value to set + * @return the NetworkMappingProperties object itself. + */ + public NetworkMappingProperties withPrimaryFabricFriendlyName(String primaryFabricFriendlyName) { + this.primaryFabricFriendlyName = primaryFabricFriendlyName; + return this; + } + + /** + * Get the recovery network friendly name. + * + * @return the recoveryNetworkFriendlyName value + */ + public String recoveryNetworkFriendlyName() { + return this.recoveryNetworkFriendlyName; + } + + /** + * Set the recovery network friendly name. + * + * @param recoveryNetworkFriendlyName the recoveryNetworkFriendlyName value to set + * @return the NetworkMappingProperties object itself. + */ + public NetworkMappingProperties withRecoveryNetworkFriendlyName(String recoveryNetworkFriendlyName) { + this.recoveryNetworkFriendlyName = recoveryNetworkFriendlyName; + return this; + } + + /** + * Get the recovery network id for network mapping. + * + * @return the recoveryNetworkId value + */ + public String recoveryNetworkId() { + return this.recoveryNetworkId; + } + + /** + * Set the recovery network id for network mapping. + * + * @param recoveryNetworkId the recoveryNetworkId value to set + * @return the NetworkMappingProperties object itself. + */ + public NetworkMappingProperties withRecoveryNetworkId(String recoveryNetworkId) { + this.recoveryNetworkId = recoveryNetworkId; + return this; + } + + /** + * Get the recovery fabric ARM id. + * + * @return the recoveryFabricArmId value + */ + public String recoveryFabricArmId() { + return this.recoveryFabricArmId; + } + + /** + * Set the recovery fabric ARM id. + * + * @param recoveryFabricArmId the recoveryFabricArmId value to set + * @return the NetworkMappingProperties object itself. + */ + public NetworkMappingProperties withRecoveryFabricArmId(String recoveryFabricArmId) { + this.recoveryFabricArmId = recoveryFabricArmId; + return this; + } + + /** + * Get the recovery fabric friendly name. + * + * @return the recoveryFabricFriendlyName value + */ + public String recoveryFabricFriendlyName() { + return this.recoveryFabricFriendlyName; + } + + /** + * Set the recovery fabric friendly name. + * + * @param recoveryFabricFriendlyName the recoveryFabricFriendlyName value to set + * @return the NetworkMappingProperties object itself. + */ + public NetworkMappingProperties withRecoveryFabricFriendlyName(String recoveryFabricFriendlyName) { + this.recoveryFabricFriendlyName = recoveryFabricFriendlyName; + return this; + } + + /** + * Get the fabric specific settings. + * + * @return the fabricSpecificSettings value + */ + public NetworkMappingFabricSpecificSettings fabricSpecificSettings() { + return this.fabricSpecificSettings; + } + + /** + * Set the fabric specific settings. + * + * @param fabricSpecificSettings the fabricSpecificSettings value to set + * @return the NetworkMappingProperties object itself. + */ + public NetworkMappingProperties withFabricSpecificSettings(NetworkMappingFabricSpecificSettings fabricSpecificSettings) { + this.fabricSpecificSettings = fabricSpecificSettings; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/NetworkProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/NetworkProperties.java new file mode 100644 index 0000000000000..ade2fa5065bef --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/NetworkProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Network Properties. + */ +public class NetworkProperties { + /** + * The Fabric Type. + */ + @JsonProperty(value = "fabricType") + private String fabricType; + + /** + * The List of subnets. + */ + @JsonProperty(value = "subnets") + private List subnets; + + /** + * The Friendly Name. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * The Network Type. + */ + @JsonProperty(value = "networkType") + private String networkType; + + /** + * Get the Fabric Type. + * + * @return the fabricType value + */ + public String fabricType() { + return this.fabricType; + } + + /** + * Set the Fabric Type. + * + * @param fabricType the fabricType value to set + * @return the NetworkProperties object itself. + */ + public NetworkProperties withFabricType(String fabricType) { + this.fabricType = fabricType; + return this; + } + + /** + * Get the List of subnets. + * + * @return the subnets value + */ + public List subnets() { + return this.subnets; + } + + /** + * Set the List of subnets. + * + * @param subnets the subnets value to set + * @return the NetworkProperties object itself. + */ + public NetworkProperties withSubnets(List subnets) { + this.subnets = subnets; + return this; + } + + /** + * Get the Friendly Name. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the Friendly Name. + * + * @param friendlyName the friendlyName value to set + * @return the NetworkProperties object itself. + */ + public NetworkProperties withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the Network Type. + * + * @return the networkType value + */ + public String networkType() { + return this.networkType; + } + + /** + * Set the Network Type. + * + * @param networkType the networkType value to set + * @return the NetworkProperties object itself. + */ + public NetworkProperties withNetworkType(String networkType) { + this.networkType = networkType; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/OSDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/OSDetails.java new file mode 100644 index 0000000000000..324fdeff7775e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/OSDetails.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Disk Details. + */ +public class OSDetails { + /** + * VM Disk details. + */ + @JsonProperty(value = "osType") + private String osType; + + /** + * Product type. + */ + @JsonProperty(value = "productType") + private String productType; + + /** + * The OSEdition. + */ + @JsonProperty(value = "osEdition") + private String osEdition; + + /** + * The OS Version. + */ + @JsonProperty(value = "oSVersion") + private String oSVersion; + + /** + * The OS Major Version. + */ + @JsonProperty(value = "oSMajorVersion") + private String oSMajorVersion; + + /** + * The OS Minor Version. + */ + @JsonProperty(value = "oSMinorVersion") + private String oSMinorVersion; + + /** + * Get vM Disk details. + * + * @return the osType value + */ + public String osType() { + return this.osType; + } + + /** + * Set vM Disk details. + * + * @param osType the osType value to set + * @return the OSDetails object itself. + */ + public OSDetails withOsType(String osType) { + this.osType = osType; + return this; + } + + /** + * Get product type. + * + * @return the productType value + */ + public String productType() { + return this.productType; + } + + /** + * Set product type. + * + * @param productType the productType value to set + * @return the OSDetails object itself. + */ + public OSDetails withProductType(String productType) { + this.productType = productType; + return this; + } + + /** + * Get the OSEdition. + * + * @return the osEdition value + */ + public String osEdition() { + return this.osEdition; + } + + /** + * Set the OSEdition. + * + * @param osEdition the osEdition value to set + * @return the OSDetails object itself. + */ + public OSDetails withOsEdition(String osEdition) { + this.osEdition = osEdition; + return this; + } + + /** + * Get the OS Version. + * + * @return the oSVersion value + */ + public String oSVersion() { + return this.oSVersion; + } + + /** + * Set the OS Version. + * + * @param oSVersion the oSVersion value to set + * @return the OSDetails object itself. + */ + public OSDetails withOSVersion(String oSVersion) { + this.oSVersion = oSVersion; + return this; + } + + /** + * Get the OS Major Version. + * + * @return the oSMajorVersion value + */ + public String oSMajorVersion() { + return this.oSMajorVersion; + } + + /** + * Set the OS Major Version. + * + * @param oSMajorVersion the oSMajorVersion value to set + * @return the OSDetails object itself. + */ + public OSDetails withOSMajorVersion(String oSMajorVersion) { + this.oSMajorVersion = oSMajorVersion; + return this; + } + + /** + * Get the OS Minor Version. + * + * @return the oSMinorVersion value + */ + public String oSMinorVersion() { + return this.oSMinorVersion; + } + + /** + * Set the OS Minor Version. + * + * @param oSMinorVersion the oSMinorVersion value to set + * @return the OSDetails object itself. + */ + public OSDetails withOSMinorVersion(String oSMinorVersion) { + this.oSMinorVersion = oSMinorVersion; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/OSDiskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/OSDiskDetails.java new file mode 100644 index 0000000000000..6fd90b2094f2f --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/OSDiskDetails.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of the OS Disk. + */ +public class OSDiskDetails { + /** + * The id of the disk containing the OS. + */ + @JsonProperty(value = "osVhdId") + private String osVhdId; + + /** + * The type of the OS on the VM. + */ + @JsonProperty(value = "osType") + private String osType; + + /** + * The OS disk VHD name. + */ + @JsonProperty(value = "vhdName") + private String vhdName; + + /** + * Get the id of the disk containing the OS. + * + * @return the osVhdId value + */ + public String osVhdId() { + return this.osVhdId; + } + + /** + * Set the id of the disk containing the OS. + * + * @param osVhdId the osVhdId value to set + * @return the OSDiskDetails object itself. + */ + public OSDiskDetails withOsVhdId(String osVhdId) { + this.osVhdId = osVhdId; + return this; + } + + /** + * Get the type of the OS on the VM. + * + * @return the osType value + */ + public String osType() { + return this.osType; + } + + /** + * Set the type of the OS on the VM. + * + * @param osType the osType value to set + * @return the OSDiskDetails object itself. + */ + public OSDiskDetails withOsType(String osType) { + this.osType = osType; + return this; + } + + /** + * Get the OS disk VHD name. + * + * @return the vhdName value + */ + public String vhdName() { + return this.vhdName; + } + + /** + * Set the OS disk VHD name. + * + * @param vhdName the vhdName value to set + * @return the OSDiskDetails object itself. + */ + public OSDiskDetails withVhdName(String vhdName) { + this.vhdName = vhdName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Operations.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Operations.java new file mode 100644 index 0000000000000..0cb3bfbcc5174 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Operations.java @@ -0,0 +1,19 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends SupportsListing, HasInner { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/OperationsDiscovery.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/OperationsDiscovery.java new file mode 100644 index 0000000000000..7222e36abf698 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/OperationsDiscovery.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.OperationsDiscoveryInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; + +/** + * Type representing OperationsDiscovery. + */ +public interface OperationsDiscovery extends HasInner, HasManager { + /** + * @return the display value. + */ + Display display(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the origin value. + */ + String origin(); + + /** + * @return the properties value. + */ + Object properties(); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PlannedFailoverInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PlannedFailoverInput.java new file mode 100644 index 0000000000000..dc399d1c8dc2e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PlannedFailoverInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input definition for planned failover. + */ +public class PlannedFailoverInput { + /** + * Planned failover input properties. + */ + @JsonProperty(value = "properties") + private PlannedFailoverInputProperties properties; + + /** + * Get planned failover input properties. + * + * @return the properties value + */ + public PlannedFailoverInputProperties properties() { + return this.properties; + } + + /** + * Set planned failover input properties. + * + * @param properties the properties value to set + * @return the PlannedFailoverInput object itself. + */ + public PlannedFailoverInput withProperties(PlannedFailoverInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PlannedFailoverInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PlannedFailoverInputProperties.java new file mode 100644 index 0000000000000..1510063dae4b6 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PlannedFailoverInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input definition for planned failover input properties. + */ +public class PlannedFailoverInputProperties { + /** + * Failover direction. + */ + @JsonProperty(value = "failoverDirection") + private String failoverDirection; + + /** + * Provider specific settings. + */ + @JsonProperty(value = "providerSpecificDetails") + private ProviderSpecificFailoverInput providerSpecificDetails; + + /** + * Get failover direction. + * + * @return the failoverDirection value + */ + public String failoverDirection() { + return this.failoverDirection; + } + + /** + * Set failover direction. + * + * @param failoverDirection the failoverDirection value to set + * @return the PlannedFailoverInputProperties object itself. + */ + public PlannedFailoverInputProperties withFailoverDirection(String failoverDirection) { + this.failoverDirection = failoverDirection; + return this; + } + + /** + * Get provider specific settings. + * + * @return the providerSpecificDetails value + */ + public ProviderSpecificFailoverInput providerSpecificDetails() { + return this.providerSpecificDetails; + } + + /** + * Set provider specific settings. + * + * @param providerSpecificDetails the providerSpecificDetails value to set + * @return the PlannedFailoverInputProperties object itself. + */ + public PlannedFailoverInputProperties withProviderSpecificDetails(ProviderSpecificFailoverInput providerSpecificDetails) { + this.providerSpecificDetails = providerSpecificDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Policy.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Policy.java new file mode 100644 index 0000000000000..f0dc3fb7d4a82 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Policy.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.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.PolicyInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; + +/** + * Type representing Policy. + */ +public interface Policy extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + PolicyProperties properties(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the Policy definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithVault, DefinitionStages.WithCreate { + } + + /** + * Grouping of Policy definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Policy definition. + */ + interface Blank extends WithVault { + } + + /** + * The stage of the policy definition allowing to specify Vault. + */ + interface WithVault { + /** + * Specifies . + */ + WithCreate withExistingVault(); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a Policy update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable { + } + + /** + * Grouping of Policy update stages. + */ + interface UpdateStages { + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PolicyProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PolicyProperties.java new file mode 100644 index 0000000000000..c9addf7b9f6c2 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PolicyProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Protection profile custom data details. + */ +public class PolicyProperties { + /** + * The FriendlyName. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * The ReplicationChannelSetting. + */ + @JsonProperty(value = "providerSpecificDetails") + private PolicyProviderSpecificDetails providerSpecificDetails; + + /** + * Get the FriendlyName. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the FriendlyName. + * + * @param friendlyName the friendlyName value to set + * @return the PolicyProperties object itself. + */ + public PolicyProperties withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the ReplicationChannelSetting. + * + * @return the providerSpecificDetails value + */ + public PolicyProviderSpecificDetails providerSpecificDetails() { + return this.providerSpecificDetails; + } + + /** + * Set the ReplicationChannelSetting. + * + * @param providerSpecificDetails the providerSpecificDetails value to set + * @return the PolicyProperties object itself. + */ + public PolicyProperties withProviderSpecificDetails(PolicyProviderSpecificDetails providerSpecificDetails) { + this.providerSpecificDetails = providerSpecificDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PolicyProviderSpecificDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PolicyProviderSpecificDetails.java new file mode 100644 index 0000000000000..39b628668e074 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PolicyProviderSpecificDetails.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Base class for Provider specific details for policies. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("PolicyProviderSpecificDetails") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "HyperVReplicaAzure", value = HyperVReplicaAzurePolicyDetails.class), + @JsonSubTypes.Type(name = "HyperVReplicaBasePolicyDetails", value = HyperVReplicaBasePolicyDetails.class), + @JsonSubTypes.Type(name = "HyperVReplica2012", value = HyperVReplicaPolicyDetails.class), + @JsonSubTypes.Type(name = "HyperVReplica2012R2", value = HyperVReplicaBluePolicyDetails.class), + @JsonSubTypes.Type(name = "InMageBasePolicyDetails", value = InMageBasePolicyDetails.class), + @JsonSubTypes.Type(name = "InMageAzureV2", value = InMageAzureV2PolicyDetails.class), + @JsonSubTypes.Type(name = "InMage", value = InMagePolicyDetails.class), + @JsonSubTypes.Type(name = "A2A", value = A2APolicyDetails.class), + @JsonSubTypes.Type(name = "RcmAzureMigration", value = RcmAzureMigrationPolicyDetails.class), + @JsonSubTypes.Type(name = "VMwareCbt", value = VmwareCbtPolicyDetails.class) +}) +public class PolicyProviderSpecificDetails { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PolicyProviderSpecificInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PolicyProviderSpecificInput.java new file mode 100644 index 0000000000000..1f6b4ec11926a --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PolicyProviderSpecificInput.java @@ -0,0 +1,30 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Base class for provider specific input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("PolicyProviderSpecificInput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "HyperVReplicaAzure", value = HyperVReplicaAzurePolicyInput.class), + @JsonSubTypes.Type(name = "HyperVReplica2012", value = HyperVReplicaPolicyInput.class), + @JsonSubTypes.Type(name = "HyperVReplica2012R2", value = HyperVReplicaBluePolicyInput.class), + @JsonSubTypes.Type(name = "InMageAzureV2", value = InMageAzureV2PolicyInput.class), + @JsonSubTypes.Type(name = "InMage", value = InMagePolicyInput.class), + @JsonSubTypes.Type(name = "A2A", value = A2APolicyCreationInput.class), + @JsonSubTypes.Type(name = "VMwareCbt", value = VMwareCbtPolicyCreationInput.class) +}) +public class PolicyProviderSpecificInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PossibleOperationsDirections.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PossibleOperationsDirections.java new file mode 100644 index 0000000000000..3bc2a14d6df91 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/PossibleOperationsDirections.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for PossibleOperationsDirections. + */ +public enum PossibleOperationsDirections { + /** Enum value PrimaryToRecovery. */ + PRIMARY_TO_RECOVERY("PrimaryToRecovery"), + + /** Enum value RecoveryToPrimary. */ + RECOVERY_TO_PRIMARY("RecoveryToPrimary"); + + /** The actual serialized value for a PossibleOperationsDirections instance. */ + private String value; + + PossibleOperationsDirections(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a PossibleOperationsDirections instance. + * + * @param value the serialized value to parse. + * @return the parsed PossibleOperationsDirections object, or null if unable to parse. + */ + @JsonCreator + public static PossibleOperationsDirections fromString(String value) { + PossibleOperationsDirections[] items = PossibleOperationsDirections.values(); + for (PossibleOperationsDirections item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProcessServer.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProcessServer.java new file mode 100644 index 0000000000000..7c5b5e2d1d106 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProcessServer.java @@ -0,0 +1,671 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of the Process Server. + */ +public class ProcessServer { + /** + * The Process Server's friendly name. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * The Process Server Id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The IP address of the server. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * The OS type of the server. + */ + @JsonProperty(value = "osType") + private String osType; + + /** + * The version of the scout component on the server. + */ + @JsonProperty(value = "agentVersion") + private String agentVersion; + + /** + * The last heartbeat received from the server. + */ + @JsonProperty(value = "lastHeartbeat") + private DateTime lastHeartbeat; + + /** + * Version status. + */ + @JsonProperty(value = "versionStatus") + private String versionStatus; + + /** + * The list of the mobility service updates available on the Process + * Server. + */ + @JsonProperty(value = "mobilityServiceUpdates") + private List mobilityServiceUpdates; + + /** + * The agent generated Id. + */ + @JsonProperty(value = "hostId") + private String hostId; + + /** + * The servers configured with this PS. + */ + @JsonProperty(value = "machineCount") + private String machineCount; + + /** + * The number of replication pairs configured in this PS. + */ + @JsonProperty(value = "replicationPairCount") + private String replicationPairCount; + + /** + * The percentage of the system load. + */ + @JsonProperty(value = "systemLoad") + private String systemLoad; + + /** + * The system load status. + */ + @JsonProperty(value = "systemLoadStatus") + private String systemLoadStatus; + + /** + * The percentage of the CPU load. + */ + @JsonProperty(value = "cpuLoad") + private String cpuLoad; + + /** + * The CPU load status. + */ + @JsonProperty(value = "cpuLoadStatus") + private String cpuLoadStatus; + + /** + * The total memory. + */ + @JsonProperty(value = "totalMemoryInBytes") + private Long totalMemoryInBytes; + + /** + * The available memory. + */ + @JsonProperty(value = "availableMemoryInBytes") + private Long availableMemoryInBytes; + + /** + * The memory usage status. + */ + @JsonProperty(value = "memoryUsageStatus") + private String memoryUsageStatus; + + /** + * The total space. + */ + @JsonProperty(value = "totalSpaceInBytes") + private Long totalSpaceInBytes; + + /** + * The available space. + */ + @JsonProperty(value = "availableSpaceInBytes") + private Long availableSpaceInBytes; + + /** + * The space usage status. + */ + @JsonProperty(value = "spaceUsageStatus") + private String spaceUsageStatus; + + /** + * The PS service status. + */ + @JsonProperty(value = "psServiceStatus") + private String psServiceStatus; + + /** + * The PS SSL cert expiry date. + */ + @JsonProperty(value = "sslCertExpiryDate") + private DateTime sslCertExpiryDate; + + /** + * CS SSL cert expiry date. + */ + @JsonProperty(value = "sslCertExpiryRemainingDays") + private Integer sslCertExpiryRemainingDays; + + /** + * OS Version of the process server. Note: This will get populated if user + * has CS version greater than 9.12.0.0. + */ + @JsonProperty(value = "osVersion") + private String osVersion; + + /** + * Get the Process Server's friendly name. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the Process Server's friendly name. + * + * @param friendlyName the friendlyName value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the Process Server Id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the Process Server Id. + * + * @param id the id value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withId(String id) { + this.id = id; + return this; + } + + /** + * Get the IP address of the server. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the IP address of the server. + * + * @param ipAddress the ipAddress value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the OS type of the server. + * + * @return the osType value + */ + public String osType() { + return this.osType; + } + + /** + * Set the OS type of the server. + * + * @param osType the osType value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withOsType(String osType) { + this.osType = osType; + return this; + } + + /** + * Get the version of the scout component on the server. + * + * @return the agentVersion value + */ + public String agentVersion() { + return this.agentVersion; + } + + /** + * Set the version of the scout component on the server. + * + * @param agentVersion the agentVersion value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withAgentVersion(String agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + /** + * Get the last heartbeat received from the server. + * + * @return the lastHeartbeat value + */ + public DateTime lastHeartbeat() { + return this.lastHeartbeat; + } + + /** + * Set the last heartbeat received from the server. + * + * @param lastHeartbeat the lastHeartbeat value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withLastHeartbeat(DateTime lastHeartbeat) { + this.lastHeartbeat = lastHeartbeat; + return this; + } + + /** + * Get version status. + * + * @return the versionStatus value + */ + public String versionStatus() { + return this.versionStatus; + } + + /** + * Set version status. + * + * @param versionStatus the versionStatus value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withVersionStatus(String versionStatus) { + this.versionStatus = versionStatus; + return this; + } + + /** + * Get the list of the mobility service updates available on the Process Server. + * + * @return the mobilityServiceUpdates value + */ + public List mobilityServiceUpdates() { + return this.mobilityServiceUpdates; + } + + /** + * Set the list of the mobility service updates available on the Process Server. + * + * @param mobilityServiceUpdates the mobilityServiceUpdates value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withMobilityServiceUpdates(List mobilityServiceUpdates) { + this.mobilityServiceUpdates = mobilityServiceUpdates; + return this; + } + + /** + * Get the agent generated Id. + * + * @return the hostId value + */ + public String hostId() { + return this.hostId; + } + + /** + * Set the agent generated Id. + * + * @param hostId the hostId value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withHostId(String hostId) { + this.hostId = hostId; + return this; + } + + /** + * Get the servers configured with this PS. + * + * @return the machineCount value + */ + public String machineCount() { + return this.machineCount; + } + + /** + * Set the servers configured with this PS. + * + * @param machineCount the machineCount value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withMachineCount(String machineCount) { + this.machineCount = machineCount; + return this; + } + + /** + * Get the number of replication pairs configured in this PS. + * + * @return the replicationPairCount value + */ + public String replicationPairCount() { + return this.replicationPairCount; + } + + /** + * Set the number of replication pairs configured in this PS. + * + * @param replicationPairCount the replicationPairCount value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withReplicationPairCount(String replicationPairCount) { + this.replicationPairCount = replicationPairCount; + return this; + } + + /** + * Get the percentage of the system load. + * + * @return the systemLoad value + */ + public String systemLoad() { + return this.systemLoad; + } + + /** + * Set the percentage of the system load. + * + * @param systemLoad the systemLoad value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withSystemLoad(String systemLoad) { + this.systemLoad = systemLoad; + return this; + } + + /** + * Get the system load status. + * + * @return the systemLoadStatus value + */ + public String systemLoadStatus() { + return this.systemLoadStatus; + } + + /** + * Set the system load status. + * + * @param systemLoadStatus the systemLoadStatus value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withSystemLoadStatus(String systemLoadStatus) { + this.systemLoadStatus = systemLoadStatus; + return this; + } + + /** + * Get the percentage of the CPU load. + * + * @return the cpuLoad value + */ + public String cpuLoad() { + return this.cpuLoad; + } + + /** + * Set the percentage of the CPU load. + * + * @param cpuLoad the cpuLoad value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withCpuLoad(String cpuLoad) { + this.cpuLoad = cpuLoad; + return this; + } + + /** + * Get the CPU load status. + * + * @return the cpuLoadStatus value + */ + public String cpuLoadStatus() { + return this.cpuLoadStatus; + } + + /** + * Set the CPU load status. + * + * @param cpuLoadStatus the cpuLoadStatus value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withCpuLoadStatus(String cpuLoadStatus) { + this.cpuLoadStatus = cpuLoadStatus; + return this; + } + + /** + * Get the total memory. + * + * @return the totalMemoryInBytes value + */ + public Long totalMemoryInBytes() { + return this.totalMemoryInBytes; + } + + /** + * Set the total memory. + * + * @param totalMemoryInBytes the totalMemoryInBytes value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withTotalMemoryInBytes(Long totalMemoryInBytes) { + this.totalMemoryInBytes = totalMemoryInBytes; + return this; + } + + /** + * Get the available memory. + * + * @return the availableMemoryInBytes value + */ + public Long availableMemoryInBytes() { + return this.availableMemoryInBytes; + } + + /** + * Set the available memory. + * + * @param availableMemoryInBytes the availableMemoryInBytes value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withAvailableMemoryInBytes(Long availableMemoryInBytes) { + this.availableMemoryInBytes = availableMemoryInBytes; + return this; + } + + /** + * Get the memory usage status. + * + * @return the memoryUsageStatus value + */ + public String memoryUsageStatus() { + return this.memoryUsageStatus; + } + + /** + * Set the memory usage status. + * + * @param memoryUsageStatus the memoryUsageStatus value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withMemoryUsageStatus(String memoryUsageStatus) { + this.memoryUsageStatus = memoryUsageStatus; + return this; + } + + /** + * Get the total space. + * + * @return the totalSpaceInBytes value + */ + public Long totalSpaceInBytes() { + return this.totalSpaceInBytes; + } + + /** + * Set the total space. + * + * @param totalSpaceInBytes the totalSpaceInBytes value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withTotalSpaceInBytes(Long totalSpaceInBytes) { + this.totalSpaceInBytes = totalSpaceInBytes; + return this; + } + + /** + * Get the available space. + * + * @return the availableSpaceInBytes value + */ + public Long availableSpaceInBytes() { + return this.availableSpaceInBytes; + } + + /** + * Set the available space. + * + * @param availableSpaceInBytes the availableSpaceInBytes value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withAvailableSpaceInBytes(Long availableSpaceInBytes) { + this.availableSpaceInBytes = availableSpaceInBytes; + return this; + } + + /** + * Get the space usage status. + * + * @return the spaceUsageStatus value + */ + public String spaceUsageStatus() { + return this.spaceUsageStatus; + } + + /** + * Set the space usage status. + * + * @param spaceUsageStatus the spaceUsageStatus value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withSpaceUsageStatus(String spaceUsageStatus) { + this.spaceUsageStatus = spaceUsageStatus; + return this; + } + + /** + * Get the PS service status. + * + * @return the psServiceStatus value + */ + public String psServiceStatus() { + return this.psServiceStatus; + } + + /** + * Set the PS service status. + * + * @param psServiceStatus the psServiceStatus value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withPsServiceStatus(String psServiceStatus) { + this.psServiceStatus = psServiceStatus; + return this; + } + + /** + * Get the PS SSL cert expiry date. + * + * @return the sslCertExpiryDate value + */ + public DateTime sslCertExpiryDate() { + return this.sslCertExpiryDate; + } + + /** + * Set the PS SSL cert expiry date. + * + * @param sslCertExpiryDate the sslCertExpiryDate value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withSslCertExpiryDate(DateTime sslCertExpiryDate) { + this.sslCertExpiryDate = sslCertExpiryDate; + return this; + } + + /** + * Get cS SSL cert expiry date. + * + * @return the sslCertExpiryRemainingDays value + */ + public Integer sslCertExpiryRemainingDays() { + return this.sslCertExpiryRemainingDays; + } + + /** + * Set cS SSL cert expiry date. + * + * @param sslCertExpiryRemainingDays the sslCertExpiryRemainingDays value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withSslCertExpiryRemainingDays(Integer sslCertExpiryRemainingDays) { + this.sslCertExpiryRemainingDays = sslCertExpiryRemainingDays; + return this; + } + + /** + * Get oS Version of the process server. Note: This will get populated if user has CS version greater than 9.12.0.0. + * + * @return the osVersion value + */ + public String osVersion() { + return this.osVersion; + } + + /** + * Set oS Version of the process server. Note: This will get populated if user has CS version greater than 9.12.0.0. + * + * @param osVersion the osVersion value to set + * @return the ProcessServer object itself. + */ + public ProcessServer withOsVersion(String osVersion) { + this.osVersion = osVersion; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectableItem.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectableItem.java new file mode 100644 index 0000000000000..62a201a7d7187 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectableItem.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.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ProtectableItemInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; + +/** + * Type representing ProtectableItem. + */ +public interface ProtectableItem extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + ProtectableItemProperties properties(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectableItemProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectableItemProperties.java new file mode 100644 index 0000000000000..026f4436ea806 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectableItemProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Replication protected item custom data details. + */ +public class ProtectableItemProperties { + /** + * The name. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * The protection status. + */ + @JsonProperty(value = "protectionStatus") + private String protectionStatus; + + /** + * The ARM resource of protected items. + */ + @JsonProperty(value = "replicationProtectedItemId") + private String replicationProtectedItemId; + + /** + * The recovery provider ARM Id. + */ + @JsonProperty(value = "recoveryServicesProviderId") + private String recoveryServicesProviderId; + + /** + * The Current protection readiness errors. + */ + @JsonProperty(value = "protectionReadinessErrors") + private List protectionReadinessErrors; + + /** + * The list of replication providers supported for the protectable item. + */ + @JsonProperty(value = "supportedReplicationProviders") + private List supportedReplicationProviders; + + /** + * The Replication provider custom settings. + */ + @JsonProperty(value = "customDetails") + private ConfigurationSettings customDetails; + + /** + * Get the name. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the name. + * + * @param friendlyName the friendlyName value to set + * @return the ProtectableItemProperties object itself. + */ + public ProtectableItemProperties withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the protection status. + * + * @return the protectionStatus value + */ + public String protectionStatus() { + return this.protectionStatus; + } + + /** + * Set the protection status. + * + * @param protectionStatus the protectionStatus value to set + * @return the ProtectableItemProperties object itself. + */ + public ProtectableItemProperties withProtectionStatus(String protectionStatus) { + this.protectionStatus = protectionStatus; + return this; + } + + /** + * Get the ARM resource of protected items. + * + * @return the replicationProtectedItemId value + */ + public String replicationProtectedItemId() { + return this.replicationProtectedItemId; + } + + /** + * Set the ARM resource of protected items. + * + * @param replicationProtectedItemId the replicationProtectedItemId value to set + * @return the ProtectableItemProperties object itself. + */ + public ProtectableItemProperties withReplicationProtectedItemId(String replicationProtectedItemId) { + this.replicationProtectedItemId = replicationProtectedItemId; + return this; + } + + /** + * Get the recovery provider ARM Id. + * + * @return the recoveryServicesProviderId value + */ + public String recoveryServicesProviderId() { + return this.recoveryServicesProviderId; + } + + /** + * Set the recovery provider ARM Id. + * + * @param recoveryServicesProviderId the recoveryServicesProviderId value to set + * @return the ProtectableItemProperties object itself. + */ + public ProtectableItemProperties withRecoveryServicesProviderId(String recoveryServicesProviderId) { + this.recoveryServicesProviderId = recoveryServicesProviderId; + return this; + } + + /** + * Get the Current protection readiness errors. + * + * @return the protectionReadinessErrors value + */ + public List protectionReadinessErrors() { + return this.protectionReadinessErrors; + } + + /** + * Set the Current protection readiness errors. + * + * @param protectionReadinessErrors the protectionReadinessErrors value to set + * @return the ProtectableItemProperties object itself. + */ + public ProtectableItemProperties withProtectionReadinessErrors(List protectionReadinessErrors) { + this.protectionReadinessErrors = protectionReadinessErrors; + return this; + } + + /** + * Get the list of replication providers supported for the protectable item. + * + * @return the supportedReplicationProviders value + */ + public List supportedReplicationProviders() { + return this.supportedReplicationProviders; + } + + /** + * Set the list of replication providers supported for the protectable item. + * + * @param supportedReplicationProviders the supportedReplicationProviders value to set + * @return the ProtectableItemProperties object itself. + */ + public ProtectableItemProperties withSupportedReplicationProviders(List supportedReplicationProviders) { + this.supportedReplicationProviders = supportedReplicationProviders; + return this; + } + + /** + * Get the Replication provider custom settings. + * + * @return the customDetails value + */ + public ConfigurationSettings customDetails() { + return this.customDetails; + } + + /** + * Set the Replication provider custom settings. + * + * @param customDetails the customDetails value to set + * @return the ProtectableItemProperties object itself. + */ + public ProtectableItemProperties withCustomDetails(ConfigurationSettings customDetails) { + this.customDetails = customDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectedItemsQueryParameter.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectedItemsQueryParameter.java new file mode 100644 index 0000000000000..e031f5e90a601 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectedItemsQueryParameter.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Query parameter to enumerate protected items. + */ +public class ProtectedItemsQueryParameter { + /** + * The source fabric name filter. + */ + @JsonProperty(value = "sourceFabricName") + private String sourceFabricName; + + /** + * The recovery plan filter. + */ + @JsonProperty(value = "recoveryPlanName") + private String recoveryPlanName; + + /** + * The vCenter name filter. + */ + @JsonProperty(value = "vCenterName") + private String vCenterName; + + /** + * Get the source fabric name filter. + * + * @return the sourceFabricName value + */ + public String sourceFabricName() { + return this.sourceFabricName; + } + + /** + * Set the source fabric name filter. + * + * @param sourceFabricName the sourceFabricName value to set + * @return the ProtectedItemsQueryParameter object itself. + */ + public ProtectedItemsQueryParameter withSourceFabricName(String sourceFabricName) { + this.sourceFabricName = sourceFabricName; + return this; + } + + /** + * Get the recovery plan filter. + * + * @return the recoveryPlanName value + */ + public String recoveryPlanName() { + return this.recoveryPlanName; + } + + /** + * Set the recovery plan filter. + * + * @param recoveryPlanName the recoveryPlanName value to set + * @return the ProtectedItemsQueryParameter object itself. + */ + public ProtectedItemsQueryParameter withRecoveryPlanName(String recoveryPlanName) { + this.recoveryPlanName = recoveryPlanName; + return this; + } + + /** + * Get the vCenter name filter. + * + * @return the vCenterName value + */ + public String vCenterName() { + return this.vCenterName; + } + + /** + * Set the vCenter name filter. + * + * @param vCenterName the vCenterName value to set + * @return the ProtectedItemsQueryParameter object itself. + */ + public ProtectedItemsQueryParameter withVCenterName(String vCenterName) { + this.vCenterName = vCenterName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainer.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainer.java new file mode 100644 index 0000000000000..cf414db62600a --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainer.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.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ProtectionContainerInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; + +/** + * Type representing ProtectionContainer. + */ +public interface ProtectionContainer extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + ProtectionContainerProperties properties(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the ProtectionContainer definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithReplicationFabric, DefinitionStages.WithCreate { + } + + /** + * Grouping of ProtectionContainer definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ProtectionContainer definition. + */ + interface Blank extends WithReplicationFabric { + } + + /** + * The stage of the protectioncontainer definition allowing to specify ReplicationFabric. + */ + interface WithReplicationFabric { + /** + * Specifies fabricName. + */ + WithCreate withExistingReplicationFabric(String fabricName); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a ProtectionContainer update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable { + } + + /** + * Grouping of ProtectionContainer update stages. + */ + interface UpdateStages { + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerFabricSpecificDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerFabricSpecificDetails.java new file mode 100644 index 0000000000000..db030db0d2e28 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerFabricSpecificDetails.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Base class for fabric specific details of container. + */ +public class ProtectionContainerFabricSpecificDetails { + /** + * Gets the class type. Overriden in derived classes. + */ + @JsonProperty(value = "instanceType", access = JsonProperty.Access.WRITE_ONLY) + private String instanceType; + + /** + * Get gets the class type. Overriden in derived classes. + * + * @return the instanceType value + */ + public String instanceType() { + return this.instanceType; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerMapping.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerMapping.java new file mode 100644 index 0000000000000..87ac1e1e6cbb8 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerMapping.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.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ProtectionContainerMappingInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; + +/** + * Type representing ProtectionContainerMapping. + */ +public interface ProtectionContainerMapping extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + ProtectionContainerMappingProperties properties(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the ProtectionContainerMapping definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithReplicationProtectionContainer, DefinitionStages.WithCreate { + } + + /** + * Grouping of ProtectionContainerMapping definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ProtectionContainerMapping definition. + */ + interface Blank extends WithReplicationProtectionContainer { + } + + /** + * The stage of the protectioncontainermapping definition allowing to specify ReplicationProtectionContainer. + */ + interface WithReplicationProtectionContainer { + /** + * Specifies fabricName, protectionContainerName. + */ + WithCreate withExistingReplicationProtectionContainer(String fabricName, String protectionContainerName); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a ProtectionContainerMapping update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable { + } + + /** + * Grouping of ProtectionContainerMapping update stages. + */ + interface UpdateStages { + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerMappingProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerMappingProperties.java new file mode 100644 index 0000000000000..72315480e4861 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerMappingProperties.java @@ -0,0 +1,304 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Protection container mapping properties. + */ +public class ProtectionContainerMappingProperties { + /** + * Paired protection container ARM ID. + */ + @JsonProperty(value = "targetProtectionContainerId") + private String targetProtectionContainerId; + + /** + * Friendly name of paired container. + */ + @JsonProperty(value = "targetProtectionContainerFriendlyName") + private String targetProtectionContainerFriendlyName; + + /** + * Provider specific provider details. + */ + @JsonProperty(value = "providerSpecificDetails") + private ProtectionContainerMappingProviderSpecificDetails providerSpecificDetails; + + /** + * Health of pairing. + */ + @JsonProperty(value = "health") + private String health; + + /** + * Health error. + */ + @JsonProperty(value = "healthErrorDetails") + private List healthErrorDetails; + + /** + * Policy ARM Id. + */ + @JsonProperty(value = "policyId") + private String policyId; + + /** + * Association Status. + */ + @JsonProperty(value = "state") + private String state; + + /** + * Friendly name of source protection container. + */ + @JsonProperty(value = "sourceProtectionContainerFriendlyName") + private String sourceProtectionContainerFriendlyName; + + /** + * Friendly name of source fabric. + */ + @JsonProperty(value = "sourceFabricFriendlyName") + private String sourceFabricFriendlyName; + + /** + * Friendly name of target fabric. + */ + @JsonProperty(value = "targetFabricFriendlyName") + private String targetFabricFriendlyName; + + /** + * Friendly name of replication policy. + */ + @JsonProperty(value = "policyFriendlyName") + private String policyFriendlyName; + + /** + * Get paired protection container ARM ID. + * + * @return the targetProtectionContainerId value + */ + public String targetProtectionContainerId() { + return this.targetProtectionContainerId; + } + + /** + * Set paired protection container ARM ID. + * + * @param targetProtectionContainerId the targetProtectionContainerId value to set + * @return the ProtectionContainerMappingProperties object itself. + */ + public ProtectionContainerMappingProperties withTargetProtectionContainerId(String targetProtectionContainerId) { + this.targetProtectionContainerId = targetProtectionContainerId; + return this; + } + + /** + * Get friendly name of paired container. + * + * @return the targetProtectionContainerFriendlyName value + */ + public String targetProtectionContainerFriendlyName() { + return this.targetProtectionContainerFriendlyName; + } + + /** + * Set friendly name of paired container. + * + * @param targetProtectionContainerFriendlyName the targetProtectionContainerFriendlyName value to set + * @return the ProtectionContainerMappingProperties object itself. + */ + public ProtectionContainerMappingProperties withTargetProtectionContainerFriendlyName(String targetProtectionContainerFriendlyName) { + this.targetProtectionContainerFriendlyName = targetProtectionContainerFriendlyName; + return this; + } + + /** + * Get provider specific provider details. + * + * @return the providerSpecificDetails value + */ + public ProtectionContainerMappingProviderSpecificDetails providerSpecificDetails() { + return this.providerSpecificDetails; + } + + /** + * Set provider specific provider details. + * + * @param providerSpecificDetails the providerSpecificDetails value to set + * @return the ProtectionContainerMappingProperties object itself. + */ + public ProtectionContainerMappingProperties withProviderSpecificDetails(ProtectionContainerMappingProviderSpecificDetails providerSpecificDetails) { + this.providerSpecificDetails = providerSpecificDetails; + return this; + } + + /** + * Get health of pairing. + * + * @return the health value + */ + public String health() { + return this.health; + } + + /** + * Set health of pairing. + * + * @param health the health value to set + * @return the ProtectionContainerMappingProperties object itself. + */ + public ProtectionContainerMappingProperties withHealth(String health) { + this.health = health; + return this; + } + + /** + * Get health error. + * + * @return the healthErrorDetails value + */ + public List healthErrorDetails() { + return this.healthErrorDetails; + } + + /** + * Set health error. + * + * @param healthErrorDetails the healthErrorDetails value to set + * @return the ProtectionContainerMappingProperties object itself. + */ + public ProtectionContainerMappingProperties withHealthErrorDetails(List healthErrorDetails) { + this.healthErrorDetails = healthErrorDetails; + return this; + } + + /** + * Get policy ARM Id. + * + * @return the policyId value + */ + public String policyId() { + return this.policyId; + } + + /** + * Set policy ARM Id. + * + * @param policyId the policyId value to set + * @return the ProtectionContainerMappingProperties object itself. + */ + public ProtectionContainerMappingProperties withPolicyId(String policyId) { + this.policyId = policyId; + return this; + } + + /** + * Get association Status. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Set association Status. + * + * @param state the state value to set + * @return the ProtectionContainerMappingProperties object itself. + */ + public ProtectionContainerMappingProperties withState(String state) { + this.state = state; + return this; + } + + /** + * Get friendly name of source protection container. + * + * @return the sourceProtectionContainerFriendlyName value + */ + public String sourceProtectionContainerFriendlyName() { + return this.sourceProtectionContainerFriendlyName; + } + + /** + * Set friendly name of source protection container. + * + * @param sourceProtectionContainerFriendlyName the sourceProtectionContainerFriendlyName value to set + * @return the ProtectionContainerMappingProperties object itself. + */ + public ProtectionContainerMappingProperties withSourceProtectionContainerFriendlyName(String sourceProtectionContainerFriendlyName) { + this.sourceProtectionContainerFriendlyName = sourceProtectionContainerFriendlyName; + return this; + } + + /** + * Get friendly name of source fabric. + * + * @return the sourceFabricFriendlyName value + */ + public String sourceFabricFriendlyName() { + return this.sourceFabricFriendlyName; + } + + /** + * Set friendly name of source fabric. + * + * @param sourceFabricFriendlyName the sourceFabricFriendlyName value to set + * @return the ProtectionContainerMappingProperties object itself. + */ + public ProtectionContainerMappingProperties withSourceFabricFriendlyName(String sourceFabricFriendlyName) { + this.sourceFabricFriendlyName = sourceFabricFriendlyName; + return this; + } + + /** + * Get friendly name of target fabric. + * + * @return the targetFabricFriendlyName value + */ + public String targetFabricFriendlyName() { + return this.targetFabricFriendlyName; + } + + /** + * Set friendly name of target fabric. + * + * @param targetFabricFriendlyName the targetFabricFriendlyName value to set + * @return the ProtectionContainerMappingProperties object itself. + */ + public ProtectionContainerMappingProperties withTargetFabricFriendlyName(String targetFabricFriendlyName) { + this.targetFabricFriendlyName = targetFabricFriendlyName; + return this; + } + + /** + * Get friendly name of replication policy. + * + * @return the policyFriendlyName value + */ + public String policyFriendlyName() { + return this.policyFriendlyName; + } + + /** + * Set friendly name of replication policy. + * + * @param policyFriendlyName the policyFriendlyName value to set + * @return the ProtectionContainerMappingProperties object itself. + */ + public ProtectionContainerMappingProperties withPolicyFriendlyName(String policyFriendlyName) { + this.policyFriendlyName = policyFriendlyName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerMappingProviderSpecificDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerMappingProviderSpecificDetails.java new file mode 100644 index 0000000000000..78e1139158f60 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerMappingProviderSpecificDetails.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Container mapping provider specific details. + */ +public class ProtectionContainerMappingProviderSpecificDetails { + /** + * Gets the class type. Overriden in derived classes. + */ + @JsonProperty(value = "instanceType", access = JsonProperty.Access.WRITE_ONLY) + private String instanceType; + + /** + * Get gets the class type. Overriden in derived classes. + * + * @return the instanceType value + */ + public String instanceType() { + return this.instanceType; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerProperties.java new file mode 100644 index 0000000000000..d03534cfc1714 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProtectionContainerProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Protection profile custom data details. + */ +public class ProtectionContainerProperties { + /** + * Fabric friendly name. + */ + @JsonProperty(value = "fabricFriendlyName") + private String fabricFriendlyName; + + /** + * The name. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * The fabric type. + */ + @JsonProperty(value = "fabricType") + private String fabricType; + + /** + * Number of protected PEs. + */ + @JsonProperty(value = "protectedItemCount") + private Integer protectedItemCount; + + /** + * The pairing status of this cloud. + */ + @JsonProperty(value = "pairingStatus") + private String pairingStatus; + + /** + * The role of this cloud. + */ + @JsonProperty(value = "role") + private String role; + + /** + * Fabric specific details. + */ + @JsonProperty(value = "fabricSpecificDetails") + private ProtectionContainerFabricSpecificDetails fabricSpecificDetails; + + /** + * Get fabric friendly name. + * + * @return the fabricFriendlyName value + */ + public String fabricFriendlyName() { + return this.fabricFriendlyName; + } + + /** + * Set fabric friendly name. + * + * @param fabricFriendlyName the fabricFriendlyName value to set + * @return the ProtectionContainerProperties object itself. + */ + public ProtectionContainerProperties withFabricFriendlyName(String fabricFriendlyName) { + this.fabricFriendlyName = fabricFriendlyName; + return this; + } + + /** + * Get the name. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the name. + * + * @param friendlyName the friendlyName value to set + * @return the ProtectionContainerProperties object itself. + */ + public ProtectionContainerProperties withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the fabric type. + * + * @return the fabricType value + */ + public String fabricType() { + return this.fabricType; + } + + /** + * Set the fabric type. + * + * @param fabricType the fabricType value to set + * @return the ProtectionContainerProperties object itself. + */ + public ProtectionContainerProperties withFabricType(String fabricType) { + this.fabricType = fabricType; + return this; + } + + /** + * Get number of protected PEs. + * + * @return the protectedItemCount value + */ + public Integer protectedItemCount() { + return this.protectedItemCount; + } + + /** + * Set number of protected PEs. + * + * @param protectedItemCount the protectedItemCount value to set + * @return the ProtectionContainerProperties object itself. + */ + public ProtectionContainerProperties withProtectedItemCount(Integer protectedItemCount) { + this.protectedItemCount = protectedItemCount; + return this; + } + + /** + * Get the pairing status of this cloud. + * + * @return the pairingStatus value + */ + public String pairingStatus() { + return this.pairingStatus; + } + + /** + * Set the pairing status of this cloud. + * + * @param pairingStatus the pairingStatus value to set + * @return the ProtectionContainerProperties object itself. + */ + public ProtectionContainerProperties withPairingStatus(String pairingStatus) { + this.pairingStatus = pairingStatus; + return this; + } + + /** + * Get the role of this cloud. + * + * @return the role value + */ + public String role() { + return this.role; + } + + /** + * Set the role of this cloud. + * + * @param role the role value to set + * @return the ProtectionContainerProperties object itself. + */ + public ProtectionContainerProperties withRole(String role) { + this.role = role; + return this; + } + + /** + * Get fabric specific details. + * + * @return the fabricSpecificDetails value + */ + public ProtectionContainerFabricSpecificDetails fabricSpecificDetails() { + return this.fabricSpecificDetails; + } + + /** + * Set fabric specific details. + * + * @param fabricSpecificDetails the fabricSpecificDetails value to set + * @return the ProtectionContainerProperties object itself. + */ + public ProtectionContainerProperties withFabricSpecificDetails(ProtectionContainerFabricSpecificDetails fabricSpecificDetails) { + this.fabricSpecificDetails = fabricSpecificDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProviderError.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProviderError.java new file mode 100644 index 0000000000000..87cc6f655c2c9 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProviderError.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * This class contains the error details per object. + */ +public class ProviderError { + /** + * The Error code. + */ + @JsonProperty(value = "errorCode") + private Integer errorCode; + + /** + * The Error message. + */ + @JsonProperty(value = "errorMessage") + private String errorMessage; + + /** + * The Provider error Id. + */ + @JsonProperty(value = "errorId") + private String errorId; + + /** + * The possible causes for the error. + */ + @JsonProperty(value = "possibleCauses") + private String possibleCauses; + + /** + * The recommended action to resolve the error. + */ + @JsonProperty(value = "recommendedAction") + private String recommendedAction; + + /** + * Get the Error code. + * + * @return the errorCode value + */ + public Integer errorCode() { + return this.errorCode; + } + + /** + * Set the Error code. + * + * @param errorCode the errorCode value to set + * @return the ProviderError object itself. + */ + public ProviderError withErrorCode(Integer errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * Get the Error message. + * + * @return the errorMessage value + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Set the Error message. + * + * @param errorMessage the errorMessage value to set + * @return the ProviderError object itself. + */ + public ProviderError withErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Get the Provider error Id. + * + * @return the errorId value + */ + public String errorId() { + return this.errorId; + } + + /** + * Set the Provider error Id. + * + * @param errorId the errorId value to set + * @return the ProviderError object itself. + */ + public ProviderError withErrorId(String errorId) { + this.errorId = errorId; + return this; + } + + /** + * Get the possible causes for the error. + * + * @return the possibleCauses value + */ + public String possibleCauses() { + return this.possibleCauses; + } + + /** + * Set the possible causes for the error. + * + * @param possibleCauses the possibleCauses value to set + * @return the ProviderError object itself. + */ + public ProviderError withPossibleCauses(String possibleCauses) { + this.possibleCauses = possibleCauses; + return this; + } + + /** + * Get the recommended action to resolve the error. + * + * @return the recommendedAction value + */ + public String recommendedAction() { + return this.recommendedAction; + } + + /** + * Set the recommended action to resolve the error. + * + * @param recommendedAction the recommendedAction value to set + * @return the ProviderError object itself. + */ + public ProviderError withRecommendedAction(String recommendedAction) { + this.recommendedAction = recommendedAction; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProviderSpecificFailoverInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProviderSpecificFailoverInput.java new file mode 100644 index 0000000000000..2a0067dee5573 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProviderSpecificFailoverInput.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Provider specific failover input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("ProviderSpecificFailoverInput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "HyperVReplicaAzure", value = HyperVReplicaAzureFailoverProviderInput.class), + @JsonSubTypes.Type(name = "HyperVReplicaAzureFailback", value = HyperVReplicaAzureFailbackProviderInput.class), + @JsonSubTypes.Type(name = "InMageAzureV2", value = InMageAzureV2FailoverProviderInput.class), + @JsonSubTypes.Type(name = "InMage", value = InMageFailoverProviderInput.class), + @JsonSubTypes.Type(name = "A2A", value = A2AFailoverProviderInput.class) +}) +public class ProviderSpecificFailoverInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProviderSpecificRecoveryPointDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProviderSpecificRecoveryPointDetails.java new file mode 100644 index 0000000000000..ee87d8f88c211 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ProviderSpecificRecoveryPointDetails.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Replication provider specific recovery point details. + */ +public class ProviderSpecificRecoveryPointDetails { + /** + * Gets the provider type. + */ + @JsonProperty(value = "Type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get gets the provider type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RcmAzureMigrationPolicyDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RcmAzureMigrationPolicyDetails.java new file mode 100644 index 0000000000000..8a69e29fbc127 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RcmAzureMigrationPolicyDetails.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * RCM based Azure migration specific policy details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("RcmAzureMigration") +public class RcmAzureMigrationPolicyDetails extends PolicyProviderSpecificDetails { + /** + * The recovery point threshold in minutes. + */ + @JsonProperty(value = "recoveryPointThresholdInMinutes") + private Integer recoveryPointThresholdInMinutes; + + /** + * The duration in minutes until which the recovery points need to be + * stored. + */ + @JsonProperty(value = "recoveryPointHistory") + private Integer recoveryPointHistory; + + /** + * The app consistent snapshot frequency in minutes. + */ + @JsonProperty(value = "appConsistentFrequencyInMinutes") + private Integer appConsistentFrequencyInMinutes; + + /** + * A value indicating whether multi-VM sync has to be enabled. Possible + * values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "multiVmSyncStatus") + private MultiVmSyncStatus multiVmSyncStatus; + + /** + * The crash consistent snapshot frequency in minutes. + */ + @JsonProperty(value = "crashConsistentFrequencyInMinutes") + private Integer crashConsistentFrequencyInMinutes; + + /** + * Get the recovery point threshold in minutes. + * + * @return the recoveryPointThresholdInMinutes value + */ + public Integer recoveryPointThresholdInMinutes() { + return this.recoveryPointThresholdInMinutes; + } + + /** + * Set the recovery point threshold in minutes. + * + * @param recoveryPointThresholdInMinutes the recoveryPointThresholdInMinutes value to set + * @return the RcmAzureMigrationPolicyDetails object itself. + */ + public RcmAzureMigrationPolicyDetails withRecoveryPointThresholdInMinutes(Integer recoveryPointThresholdInMinutes) { + this.recoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + return this; + } + + /** + * Get the duration in minutes until which the recovery points need to be stored. + * + * @return the recoveryPointHistory value + */ + public Integer recoveryPointHistory() { + return this.recoveryPointHistory; + } + + /** + * Set the duration in minutes until which the recovery points need to be stored. + * + * @param recoveryPointHistory the recoveryPointHistory value to set + * @return the RcmAzureMigrationPolicyDetails object itself. + */ + public RcmAzureMigrationPolicyDetails withRecoveryPointHistory(Integer recoveryPointHistory) { + this.recoveryPointHistory = recoveryPointHistory; + return this; + } + + /** + * Get the app consistent snapshot frequency in minutes. + * + * @return the appConsistentFrequencyInMinutes value + */ + public Integer appConsistentFrequencyInMinutes() { + return this.appConsistentFrequencyInMinutes; + } + + /** + * Set the app consistent snapshot frequency in minutes. + * + * @param appConsistentFrequencyInMinutes the appConsistentFrequencyInMinutes value to set + * @return the RcmAzureMigrationPolicyDetails object itself. + */ + public RcmAzureMigrationPolicyDetails withAppConsistentFrequencyInMinutes(Integer appConsistentFrequencyInMinutes) { + this.appConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + return this; + } + + /** + * Get a value indicating whether multi-VM sync has to be enabled. Possible values include: 'Enabled', 'Disabled'. + * + * @return the multiVmSyncStatus value + */ + public MultiVmSyncStatus multiVmSyncStatus() { + return this.multiVmSyncStatus; + } + + /** + * Set a value indicating whether multi-VM sync has to be enabled. Possible values include: 'Enabled', 'Disabled'. + * + * @param multiVmSyncStatus the multiVmSyncStatus value to set + * @return the RcmAzureMigrationPolicyDetails object itself. + */ + public RcmAzureMigrationPolicyDetails withMultiVmSyncStatus(MultiVmSyncStatus multiVmSyncStatus) { + this.multiVmSyncStatus = multiVmSyncStatus; + return this; + } + + /** + * Get the crash consistent snapshot frequency in minutes. + * + * @return the crashConsistentFrequencyInMinutes value + */ + public Integer crashConsistentFrequencyInMinutes() { + return this.crashConsistentFrequencyInMinutes; + } + + /** + * Set the crash consistent snapshot frequency in minutes. + * + * @param crashConsistentFrequencyInMinutes the crashConsistentFrequencyInMinutes value to set + * @return the RcmAzureMigrationPolicyDetails object itself. + */ + public RcmAzureMigrationPolicyDetails withCrashConsistentFrequencyInMinutes(Integer crashConsistentFrequencyInMinutes) { + this.crashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlan.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlan.java new file mode 100644 index 0000000000000..817cddcb407ad --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlan.java @@ -0,0 +1,106 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryPlanInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; +import java.util.List; + +/** + * Type representing RecoveryPlan. + */ +public interface RecoveryPlan extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + RecoveryPlanProperties properties(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the RecoveryPlan definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithVault, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * Grouping of RecoveryPlan definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a RecoveryPlan definition. + */ + interface Blank extends WithVault { + } + + /** + * The stage of the recoveryplan definition allowing to specify Vault. + */ + interface WithVault { + /** + * Specifies . + */ + WithProperties withExistingVault(); + } + + /** + * The stage of the recoveryplan definition allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + */ + WithCreate withProperties(CreateRecoveryPlanInputProperties properties); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a RecoveryPlan update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable { + } + + /** + * Grouping of RecoveryPlan update stages. + */ + interface UpdateStages { + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanA2AFailoverInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanA2AFailoverInput.java new file mode 100644 index 0000000000000..9fa8243fbf6d2 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanA2AFailoverInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Recovery plan A2A failover input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("A2A") +public class RecoveryPlanA2AFailoverInput extends RecoveryPlanProviderSpecificFailoverInput { + /** + * The recovery point type. Possible values include: 'Latest', + * 'LatestApplicationConsistent', 'LatestCrashConsistent', + * 'LatestProcessed'. + */ + @JsonProperty(value = "recoveryPointType", required = true) + private A2ARpRecoveryPointType recoveryPointType; + + /** + * A value indicating whether to use recovery cloud service for TFO or not. + */ + @JsonProperty(value = "cloudServiceCreationOption") + private String cloudServiceCreationOption; + + /** + * Get the recovery point type. Possible values include: 'Latest', 'LatestApplicationConsistent', 'LatestCrashConsistent', 'LatestProcessed'. + * + * @return the recoveryPointType value + */ + public A2ARpRecoveryPointType recoveryPointType() { + return this.recoveryPointType; + } + + /** + * Set the recovery point type. Possible values include: 'Latest', 'LatestApplicationConsistent', 'LatestCrashConsistent', 'LatestProcessed'. + * + * @param recoveryPointType the recoveryPointType value to set + * @return the RecoveryPlanA2AFailoverInput object itself. + */ + public RecoveryPlanA2AFailoverInput withRecoveryPointType(A2ARpRecoveryPointType recoveryPointType) { + this.recoveryPointType = recoveryPointType; + return this; + } + + /** + * Get a value indicating whether to use recovery cloud service for TFO or not. + * + * @return the cloudServiceCreationOption value + */ + public String cloudServiceCreationOption() { + return this.cloudServiceCreationOption; + } + + /** + * Set a value indicating whether to use recovery cloud service for TFO or not. + * + * @param cloudServiceCreationOption the cloudServiceCreationOption value to set + * @return the RecoveryPlanA2AFailoverInput object itself. + */ + public RecoveryPlanA2AFailoverInput withCloudServiceCreationOption(String cloudServiceCreationOption) { + this.cloudServiceCreationOption = cloudServiceCreationOption; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanAction.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanAction.java new file mode 100644 index 0000000000000..b316221181857 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanAction.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Recovery plan action details. + */ +public class RecoveryPlanAction { + /** + * The action name. + */ + @JsonProperty(value = "actionName", required = true) + private String actionName; + + /** + * The list of failover types. + */ + @JsonProperty(value = "failoverTypes", required = true) + private List failoverTypes; + + /** + * The list of failover directions. + */ + @JsonProperty(value = "failoverDirections", required = true) + private List failoverDirections; + + /** + * The custom details. + */ + @JsonProperty(value = "customDetails", required = true) + private RecoveryPlanActionDetails customDetails; + + /** + * Get the action name. + * + * @return the actionName value + */ + public String actionName() { + return this.actionName; + } + + /** + * Set the action name. + * + * @param actionName the actionName value to set + * @return the RecoveryPlanAction object itself. + */ + public RecoveryPlanAction withActionName(String actionName) { + this.actionName = actionName; + return this; + } + + /** + * Get the list of failover types. + * + * @return the failoverTypes value + */ + public List failoverTypes() { + return this.failoverTypes; + } + + /** + * Set the list of failover types. + * + * @param failoverTypes the failoverTypes value to set + * @return the RecoveryPlanAction object itself. + */ + public RecoveryPlanAction withFailoverTypes(List failoverTypes) { + this.failoverTypes = failoverTypes; + return this; + } + + /** + * Get the list of failover directions. + * + * @return the failoverDirections value + */ + public List failoverDirections() { + return this.failoverDirections; + } + + /** + * Set the list of failover directions. + * + * @param failoverDirections the failoverDirections value to set + * @return the RecoveryPlanAction object itself. + */ + public RecoveryPlanAction withFailoverDirections(List failoverDirections) { + this.failoverDirections = failoverDirections; + return this; + } + + /** + * Get the custom details. + * + * @return the customDetails value + */ + public RecoveryPlanActionDetails customDetails() { + return this.customDetails; + } + + /** + * Set the custom details. + * + * @param customDetails the customDetails value to set + * @return the RecoveryPlanAction object itself. + */ + public RecoveryPlanAction withCustomDetails(RecoveryPlanActionDetails customDetails) { + this.customDetails = customDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanActionDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanActionDetails.java new file mode 100644 index 0000000000000..bfff980dba4e2 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanActionDetails.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Recovery plan action custom details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("RecoveryPlanActionDetails") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "ScriptActionDetails", value = RecoveryPlanScriptActionDetails.class), + @JsonSubTypes.Type(name = "AutomationRunbookActionDetails", value = RecoveryPlanAutomationRunbookActionDetails.class), + @JsonSubTypes.Type(name = "ManualActionDetails", value = RecoveryPlanManualActionDetails.class) +}) +public class RecoveryPlanActionDetails { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanActionLocation.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanActionLocation.java new file mode 100644 index 0000000000000..b29471c9b1ed0 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanActionLocation.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for RecoveryPlanActionLocation. + */ +public enum RecoveryPlanActionLocation { + /** Enum value Primary. */ + PRIMARY("Primary"), + + /** Enum value Recovery. */ + RECOVERY("Recovery"); + + /** The actual serialized value for a RecoveryPlanActionLocation instance. */ + private String value; + + RecoveryPlanActionLocation(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a RecoveryPlanActionLocation instance. + * + * @param value the serialized value to parse. + * @return the parsed RecoveryPlanActionLocation object, or null if unable to parse. + */ + @JsonCreator + public static RecoveryPlanActionLocation fromString(String value) { + RecoveryPlanActionLocation[] items = RecoveryPlanActionLocation.values(); + for (RecoveryPlanActionLocation item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanAutomationRunbookActionDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanAutomationRunbookActionDetails.java new file mode 100644 index 0000000000000..bd42da20fc721 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanAutomationRunbookActionDetails.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Recovery plan Automation runbook action details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("AutomationRunbookActionDetails") +public class RecoveryPlanAutomationRunbookActionDetails extends RecoveryPlanActionDetails { + /** + * The runbook ARM Id. + */ + @JsonProperty(value = "runbookId") + private String runbookId; + + /** + * The runbook timeout. + */ + @JsonProperty(value = "timeout") + private String timeout; + + /** + * The fabric location. Possible values include: 'Primary', 'Recovery'. + */ + @JsonProperty(value = "fabricLocation", required = true) + private RecoveryPlanActionLocation fabricLocation; + + /** + * Get the runbook ARM Id. + * + * @return the runbookId value + */ + public String runbookId() { + return this.runbookId; + } + + /** + * Set the runbook ARM Id. + * + * @param runbookId the runbookId value to set + * @return the RecoveryPlanAutomationRunbookActionDetails object itself. + */ + public RecoveryPlanAutomationRunbookActionDetails withRunbookId(String runbookId) { + this.runbookId = runbookId; + return this; + } + + /** + * Get the runbook timeout. + * + * @return the timeout value + */ + public String timeout() { + return this.timeout; + } + + /** + * Set the runbook timeout. + * + * @param timeout the timeout value to set + * @return the RecoveryPlanAutomationRunbookActionDetails object itself. + */ + public RecoveryPlanAutomationRunbookActionDetails withTimeout(String timeout) { + this.timeout = timeout; + return this; + } + + /** + * Get the fabric location. Possible values include: 'Primary', 'Recovery'. + * + * @return the fabricLocation value + */ + public RecoveryPlanActionLocation fabricLocation() { + return this.fabricLocation; + } + + /** + * Set the fabric location. Possible values include: 'Primary', 'Recovery'. + * + * @param fabricLocation the fabricLocation value to set + * @return the RecoveryPlanAutomationRunbookActionDetails object itself. + */ + public RecoveryPlanAutomationRunbookActionDetails withFabricLocation(RecoveryPlanActionLocation fabricLocation) { + this.fabricLocation = fabricLocation; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanGroup.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanGroup.java new file mode 100644 index 0000000000000..c86f0ab3447a7 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanGroup.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Recovery plan group details. + */ +public class RecoveryPlanGroup { + /** + * The group type. Possible values include: 'Shutdown', 'Boot', 'Failover'. + */ + @JsonProperty(value = "groupType", required = true) + private RecoveryPlanGroupType groupType; + + /** + * The list of protected items. + */ + @JsonProperty(value = "replicationProtectedItems") + private List replicationProtectedItems; + + /** + * The start group actions. + */ + @JsonProperty(value = "startGroupActions") + private List startGroupActions; + + /** + * The end group actions. + */ + @JsonProperty(value = "endGroupActions") + private List endGroupActions; + + /** + * Get the group type. Possible values include: 'Shutdown', 'Boot', 'Failover'. + * + * @return the groupType value + */ + public RecoveryPlanGroupType groupType() { + return this.groupType; + } + + /** + * Set the group type. Possible values include: 'Shutdown', 'Boot', 'Failover'. + * + * @param groupType the groupType value to set + * @return the RecoveryPlanGroup object itself. + */ + public RecoveryPlanGroup withGroupType(RecoveryPlanGroupType groupType) { + this.groupType = groupType; + return this; + } + + /** + * Get the list of protected items. + * + * @return the replicationProtectedItems value + */ + public List replicationProtectedItems() { + return this.replicationProtectedItems; + } + + /** + * Set the list of protected items. + * + * @param replicationProtectedItems the replicationProtectedItems value to set + * @return the RecoveryPlanGroup object itself. + */ + public RecoveryPlanGroup withReplicationProtectedItems(List replicationProtectedItems) { + this.replicationProtectedItems = replicationProtectedItems; + return this; + } + + /** + * Get the start group actions. + * + * @return the startGroupActions value + */ + public List startGroupActions() { + return this.startGroupActions; + } + + /** + * Set the start group actions. + * + * @param startGroupActions the startGroupActions value to set + * @return the RecoveryPlanGroup object itself. + */ + public RecoveryPlanGroup withStartGroupActions(List startGroupActions) { + this.startGroupActions = startGroupActions; + return this; + } + + /** + * Get the end group actions. + * + * @return the endGroupActions value + */ + public List endGroupActions() { + return this.endGroupActions; + } + + /** + * Set the end group actions. + * + * @param endGroupActions the endGroupActions value to set + * @return the RecoveryPlanGroup object itself. + */ + public RecoveryPlanGroup withEndGroupActions(List endGroupActions) { + this.endGroupActions = endGroupActions; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanGroupTaskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanGroupTaskDetails.java new file mode 100644 index 0000000000000..ce5327803d456 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanGroupTaskDetails.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * This class represents the recovery plan group task. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("RecoveryPlanGroupTaskDetails") +public class RecoveryPlanGroupTaskDetails extends GroupTaskDetails { + /** + * The name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The group identifier. + */ + @JsonProperty(value = "groupId") + private String groupId; + + /** + * The group type. + */ + @JsonProperty(value = "rpGroupType") + private String rpGroupType; + + /** + * Get the name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name. + * + * @param name the name value to set + * @return the RecoveryPlanGroupTaskDetails object itself. + */ + public RecoveryPlanGroupTaskDetails withName(String name) { + this.name = name; + return this; + } + + /** + * Get the group identifier. + * + * @return the groupId value + */ + public String groupId() { + return this.groupId; + } + + /** + * Set the group identifier. + * + * @param groupId the groupId value to set + * @return the RecoveryPlanGroupTaskDetails object itself. + */ + public RecoveryPlanGroupTaskDetails withGroupId(String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get the group type. + * + * @return the rpGroupType value + */ + public String rpGroupType() { + return this.rpGroupType; + } + + /** + * Set the group type. + * + * @param rpGroupType the rpGroupType value to set + * @return the RecoveryPlanGroupTaskDetails object itself. + */ + public RecoveryPlanGroupTaskDetails withRpGroupType(String rpGroupType) { + this.rpGroupType = rpGroupType; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanGroupType.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanGroupType.java new file mode 100644 index 0000000000000..f0e8f55a7994c --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanGroupType.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for RecoveryPlanGroupType. + */ +public enum RecoveryPlanGroupType { + /** Enum value Shutdown. */ + SHUTDOWN("Shutdown"), + + /** Enum value Boot. */ + BOOT("Boot"), + + /** Enum value Failover. */ + FAILOVER("Failover"); + + /** The actual serialized value for a RecoveryPlanGroupType instance. */ + private String value; + + RecoveryPlanGroupType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a RecoveryPlanGroupType instance. + * + * @param value the serialized value to parse. + * @return the parsed RecoveryPlanGroupType object, or null if unable to parse. + */ + @JsonCreator + public static RecoveryPlanGroupType fromString(String value) { + RecoveryPlanGroupType[] items = RecoveryPlanGroupType.values(); + for (RecoveryPlanGroupType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanHyperVReplicaAzureFailbackInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanHyperVReplicaAzureFailbackInput.java new file mode 100644 index 0000000000000..bf2a948299812 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanHyperVReplicaAzureFailbackInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Recovery plan HVR Azure failback input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplicaAzureFailback") +public class RecoveryPlanHyperVReplicaAzureFailbackInput extends RecoveryPlanProviderSpecificFailoverInput { + /** + * The data sync option. Possible values include: 'ForDownTime', + * 'ForSynchronization'. + */ + @JsonProperty(value = "dataSyncOption", required = true) + private DataSyncStatus dataSyncOption; + + /** + * The ALR option. Possible values include: 'CreateVmIfNotFound', + * 'NoAction'. + */ + @JsonProperty(value = "recoveryVmCreationOption", required = true) + private AlternateLocationRecoveryOption recoveryVmCreationOption; + + /** + * Get the data sync option. Possible values include: 'ForDownTime', 'ForSynchronization'. + * + * @return the dataSyncOption value + */ + public DataSyncStatus dataSyncOption() { + return this.dataSyncOption; + } + + /** + * Set the data sync option. Possible values include: 'ForDownTime', 'ForSynchronization'. + * + * @param dataSyncOption the dataSyncOption value to set + * @return the RecoveryPlanHyperVReplicaAzureFailbackInput object itself. + */ + public RecoveryPlanHyperVReplicaAzureFailbackInput withDataSyncOption(DataSyncStatus dataSyncOption) { + this.dataSyncOption = dataSyncOption; + return this; + } + + /** + * Get the ALR option. Possible values include: 'CreateVmIfNotFound', 'NoAction'. + * + * @return the recoveryVmCreationOption value + */ + public AlternateLocationRecoveryOption recoveryVmCreationOption() { + return this.recoveryVmCreationOption; + } + + /** + * Set the ALR option. Possible values include: 'CreateVmIfNotFound', 'NoAction'. + * + * @param recoveryVmCreationOption the recoveryVmCreationOption value to set + * @return the RecoveryPlanHyperVReplicaAzureFailbackInput object itself. + */ + public RecoveryPlanHyperVReplicaAzureFailbackInput withRecoveryVmCreationOption(AlternateLocationRecoveryOption recoveryVmCreationOption) { + this.recoveryVmCreationOption = recoveryVmCreationOption; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanHyperVReplicaAzureFailoverInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanHyperVReplicaAzureFailoverInput.java new file mode 100644 index 0000000000000..6ae87a7a56935 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanHyperVReplicaAzureFailoverInput.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Recovery plan HVR Azure failover input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("HyperVReplicaAzure") +public class RecoveryPlanHyperVReplicaAzureFailoverInput extends RecoveryPlanProviderSpecificFailoverInput { + /** + * The vault location. + */ + @JsonProperty(value = "vaultLocation", required = true) + private String vaultLocation; + + /** + * The primary KEK certificate PFX. + */ + @JsonProperty(value = "primaryKekCertificatePfx") + private String primaryKekCertificatePfx; + + /** + * The secondary KEK certificate PFX. + */ + @JsonProperty(value = "secondaryKekCertificatePfx") + private String secondaryKekCertificatePfx; + + /** + * The recovery point type. Possible values include: 'Latest', + * 'LatestApplicationConsistent', 'LatestProcessed'. + */ + @JsonProperty(value = "recoveryPointType") + private HyperVReplicaAzureRpRecoveryPointType recoveryPointType; + + /** + * Get the vault location. + * + * @return the vaultLocation value + */ + public String vaultLocation() { + return this.vaultLocation; + } + + /** + * Set the vault location. + * + * @param vaultLocation the vaultLocation value to set + * @return the RecoveryPlanHyperVReplicaAzureFailoverInput object itself. + */ + public RecoveryPlanHyperVReplicaAzureFailoverInput withVaultLocation(String vaultLocation) { + this.vaultLocation = vaultLocation; + return this; + } + + /** + * Get the primary KEK certificate PFX. + * + * @return the primaryKekCertificatePfx value + */ + public String primaryKekCertificatePfx() { + return this.primaryKekCertificatePfx; + } + + /** + * Set the primary KEK certificate PFX. + * + * @param primaryKekCertificatePfx the primaryKekCertificatePfx value to set + * @return the RecoveryPlanHyperVReplicaAzureFailoverInput object itself. + */ + public RecoveryPlanHyperVReplicaAzureFailoverInput withPrimaryKekCertificatePfx(String primaryKekCertificatePfx) { + this.primaryKekCertificatePfx = primaryKekCertificatePfx; + return this; + } + + /** + * Get the secondary KEK certificate PFX. + * + * @return the secondaryKekCertificatePfx value + */ + public String secondaryKekCertificatePfx() { + return this.secondaryKekCertificatePfx; + } + + /** + * Set the secondary KEK certificate PFX. + * + * @param secondaryKekCertificatePfx the secondaryKekCertificatePfx value to set + * @return the RecoveryPlanHyperVReplicaAzureFailoverInput object itself. + */ + public RecoveryPlanHyperVReplicaAzureFailoverInput withSecondaryKekCertificatePfx(String secondaryKekCertificatePfx) { + this.secondaryKekCertificatePfx = secondaryKekCertificatePfx; + return this; + } + + /** + * Get the recovery point type. Possible values include: 'Latest', 'LatestApplicationConsistent', 'LatestProcessed'. + * + * @return the recoveryPointType value + */ + public HyperVReplicaAzureRpRecoveryPointType recoveryPointType() { + return this.recoveryPointType; + } + + /** + * Set the recovery point type. Possible values include: 'Latest', 'LatestApplicationConsistent', 'LatestProcessed'. + * + * @param recoveryPointType the recoveryPointType value to set + * @return the RecoveryPlanHyperVReplicaAzureFailoverInput object itself. + */ + public RecoveryPlanHyperVReplicaAzureFailoverInput withRecoveryPointType(HyperVReplicaAzureRpRecoveryPointType recoveryPointType) { + this.recoveryPointType = recoveryPointType; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanInMageAzureV2FailoverInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanInMageAzureV2FailoverInput.java new file mode 100644 index 0000000000000..c2dca2fda7cc2 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanInMageAzureV2FailoverInput.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Recovery plan InMageAzureV2 failover input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMageAzureV2") +public class RecoveryPlanInMageAzureV2FailoverInput extends RecoveryPlanProviderSpecificFailoverInput { + /** + * The vault location. + */ + @JsonProperty(value = "vaultLocation", required = true) + private String vaultLocation; + + /** + * The recovery point type. Possible values include: 'Latest', + * 'LatestApplicationConsistent', 'LatestCrashConsistent', + * 'LatestProcessed'. + */ + @JsonProperty(value = "recoveryPointType", required = true) + private InMageV2RpRecoveryPointType recoveryPointType; + + /** + * A value indicating whether multi VM sync enabled VMs should use multi VM + * sync points for failover. + */ + @JsonProperty(value = "useMultiVmSyncPoint") + private String useMultiVmSyncPoint; + + /** + * Get the vault location. + * + * @return the vaultLocation value + */ + public String vaultLocation() { + return this.vaultLocation; + } + + /** + * Set the vault location. + * + * @param vaultLocation the vaultLocation value to set + * @return the RecoveryPlanInMageAzureV2FailoverInput object itself. + */ + public RecoveryPlanInMageAzureV2FailoverInput withVaultLocation(String vaultLocation) { + this.vaultLocation = vaultLocation; + return this; + } + + /** + * Get the recovery point type. Possible values include: 'Latest', 'LatestApplicationConsistent', 'LatestCrashConsistent', 'LatestProcessed'. + * + * @return the recoveryPointType value + */ + public InMageV2RpRecoveryPointType recoveryPointType() { + return this.recoveryPointType; + } + + /** + * Set the recovery point type. Possible values include: 'Latest', 'LatestApplicationConsistent', 'LatestCrashConsistent', 'LatestProcessed'. + * + * @param recoveryPointType the recoveryPointType value to set + * @return the RecoveryPlanInMageAzureV2FailoverInput object itself. + */ + public RecoveryPlanInMageAzureV2FailoverInput withRecoveryPointType(InMageV2RpRecoveryPointType recoveryPointType) { + this.recoveryPointType = recoveryPointType; + return this; + } + + /** + * Get a value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. + * + * @return the useMultiVmSyncPoint value + */ + public String useMultiVmSyncPoint() { + return this.useMultiVmSyncPoint; + } + + /** + * Set a value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. + * + * @param useMultiVmSyncPoint the useMultiVmSyncPoint value to set + * @return the RecoveryPlanInMageAzureV2FailoverInput object itself. + */ + public RecoveryPlanInMageAzureV2FailoverInput withUseMultiVmSyncPoint(String useMultiVmSyncPoint) { + this.useMultiVmSyncPoint = useMultiVmSyncPoint; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanInMageFailoverInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanInMageFailoverInput.java new file mode 100644 index 0000000000000..50a198e7d2096 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanInMageFailoverInput.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Recovery plan InMage failover input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("InMage") +public class RecoveryPlanInMageFailoverInput extends RecoveryPlanProviderSpecificFailoverInput { + /** + * The recovery point type. Possible values include: 'LatestTime', + * 'LatestTag', 'Custom'. + */ + @JsonProperty(value = "recoveryPointType", required = true) + private RpInMageRecoveryPointType recoveryPointType; + + /** + * Get the recovery point type. Possible values include: 'LatestTime', 'LatestTag', 'Custom'. + * + * @return the recoveryPointType value + */ + public RpInMageRecoveryPointType recoveryPointType() { + return this.recoveryPointType; + } + + /** + * Set the recovery point type. Possible values include: 'LatestTime', 'LatestTag', 'Custom'. + * + * @param recoveryPointType the recoveryPointType value to set + * @return the RecoveryPlanInMageFailoverInput object itself. + */ + public RecoveryPlanInMageFailoverInput withRecoveryPointType(RpInMageRecoveryPointType recoveryPointType) { + this.recoveryPointType = recoveryPointType; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanManualActionDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanManualActionDetails.java new file mode 100644 index 0000000000000..a9dd4a395fa18 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanManualActionDetails.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Recovery plan manual action details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("ManualActionDetails") +public class RecoveryPlanManualActionDetails extends RecoveryPlanActionDetails { + /** + * The manual action description. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the manual action description. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the manual action description. + * + * @param description the description value to set + * @return the RecoveryPlanManualActionDetails object itself. + */ + public RecoveryPlanManualActionDetails withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanPlannedFailoverInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanPlannedFailoverInput.java new file mode 100644 index 0000000000000..15ddbdcb0b13b --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanPlannedFailoverInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Recovery plan planned failover input. + */ +public class RecoveryPlanPlannedFailoverInput { + /** + * The recovery plan planned failover input properties. + */ + @JsonProperty(value = "properties", required = true) + private RecoveryPlanPlannedFailoverInputProperties properties; + + /** + * Get the recovery plan planned failover input properties. + * + * @return the properties value + */ + public RecoveryPlanPlannedFailoverInputProperties properties() { + return this.properties; + } + + /** + * Set the recovery plan planned failover input properties. + * + * @param properties the properties value to set + * @return the RecoveryPlanPlannedFailoverInput object itself. + */ + public RecoveryPlanPlannedFailoverInput withProperties(RecoveryPlanPlannedFailoverInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanPlannedFailoverInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanPlannedFailoverInputProperties.java new file mode 100644 index 0000000000000..d27bc3119b564 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanPlannedFailoverInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Recovery plan planned failover input properties. + */ +public class RecoveryPlanPlannedFailoverInputProperties { + /** + * The failover direction. Possible values include: 'PrimaryToRecovery', + * 'RecoveryToPrimary'. + */ + @JsonProperty(value = "failoverDirection", required = true) + private PossibleOperationsDirections failoverDirection; + + /** + * The provider specific properties. + */ + @JsonProperty(value = "providerSpecificDetails") + private List providerSpecificDetails; + + /** + * Get the failover direction. Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary'. + * + * @return the failoverDirection value + */ + public PossibleOperationsDirections failoverDirection() { + return this.failoverDirection; + } + + /** + * Set the failover direction. Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary'. + * + * @param failoverDirection the failoverDirection value to set + * @return the RecoveryPlanPlannedFailoverInputProperties object itself. + */ + public RecoveryPlanPlannedFailoverInputProperties withFailoverDirection(PossibleOperationsDirections failoverDirection) { + this.failoverDirection = failoverDirection; + return this; + } + + /** + * Get the provider specific properties. + * + * @return the providerSpecificDetails value + */ + public List providerSpecificDetails() { + return this.providerSpecificDetails; + } + + /** + * Set the provider specific properties. + * + * @param providerSpecificDetails the providerSpecificDetails value to set + * @return the RecoveryPlanPlannedFailoverInputProperties object itself. + */ + public RecoveryPlanPlannedFailoverInputProperties withProviderSpecificDetails(List providerSpecificDetails) { + this.providerSpecificDetails = providerSpecificDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanProperties.java new file mode 100644 index 0000000000000..172aa13367203 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanProperties.java @@ -0,0 +1,409 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Recovery plan custom details. + */ +public class RecoveryPlanProperties { + /** + * The friendly name. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * The primary fabric Id. + */ + @JsonProperty(value = "primaryFabricId") + private String primaryFabricId; + + /** + * The primary fabric friendly name. + */ + @JsonProperty(value = "primaryFabricFriendlyName") + private String primaryFabricFriendlyName; + + /** + * The recovery fabric Id. + */ + @JsonProperty(value = "recoveryFabricId") + private String recoveryFabricId; + + /** + * The recovery fabric friendly name. + */ + @JsonProperty(value = "recoveryFabricFriendlyName") + private String recoveryFabricFriendlyName; + + /** + * The failover deployment model. + */ + @JsonProperty(value = "failoverDeploymentModel") + private String failoverDeploymentModel; + + /** + * The list of replication providers. + */ + @JsonProperty(value = "replicationProviders") + private List replicationProviders; + + /** + * The list of allowed operations. + */ + @JsonProperty(value = "allowedOperations") + private List allowedOperations; + + /** + * The start time of the last planned failover. + */ + @JsonProperty(value = "lastPlannedFailoverTime") + private DateTime lastPlannedFailoverTime; + + /** + * The start time of the last unplanned failover. + */ + @JsonProperty(value = "lastUnplannedFailoverTime") + private DateTime lastUnplannedFailoverTime; + + /** + * The start time of the last test failover. + */ + @JsonProperty(value = "lastTestFailoverTime") + private DateTime lastTestFailoverTime; + + /** + * The current scenario details. + */ + @JsonProperty(value = "currentScenario") + private CurrentScenarioDetails currentScenario; + + /** + * The recovery plan status. + */ + @JsonProperty(value = "currentScenarioStatus") + private String currentScenarioStatus; + + /** + * The recovery plan status description. + */ + @JsonProperty(value = "currentScenarioStatusDescription") + private String currentScenarioStatusDescription; + + /** + * The recovery plan groups. + */ + @JsonProperty(value = "groups") + private List groups; + + /** + * Get the friendly name. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the friendly name. + * + * @param friendlyName the friendlyName value to set + * @return the RecoveryPlanProperties object itself. + */ + public RecoveryPlanProperties withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the primary fabric Id. + * + * @return the primaryFabricId value + */ + public String primaryFabricId() { + return this.primaryFabricId; + } + + /** + * Set the primary fabric Id. + * + * @param primaryFabricId the primaryFabricId value to set + * @return the RecoveryPlanProperties object itself. + */ + public RecoveryPlanProperties withPrimaryFabricId(String primaryFabricId) { + this.primaryFabricId = primaryFabricId; + return this; + } + + /** + * Get the primary fabric friendly name. + * + * @return the primaryFabricFriendlyName value + */ + public String primaryFabricFriendlyName() { + return this.primaryFabricFriendlyName; + } + + /** + * Set the primary fabric friendly name. + * + * @param primaryFabricFriendlyName the primaryFabricFriendlyName value to set + * @return the RecoveryPlanProperties object itself. + */ + public RecoveryPlanProperties withPrimaryFabricFriendlyName(String primaryFabricFriendlyName) { + this.primaryFabricFriendlyName = primaryFabricFriendlyName; + return this; + } + + /** + * Get the recovery fabric Id. + * + * @return the recoveryFabricId value + */ + public String recoveryFabricId() { + return this.recoveryFabricId; + } + + /** + * Set the recovery fabric Id. + * + * @param recoveryFabricId the recoveryFabricId value to set + * @return the RecoveryPlanProperties object itself. + */ + public RecoveryPlanProperties withRecoveryFabricId(String recoveryFabricId) { + this.recoveryFabricId = recoveryFabricId; + return this; + } + + /** + * Get the recovery fabric friendly name. + * + * @return the recoveryFabricFriendlyName value + */ + public String recoveryFabricFriendlyName() { + return this.recoveryFabricFriendlyName; + } + + /** + * Set the recovery fabric friendly name. + * + * @param recoveryFabricFriendlyName the recoveryFabricFriendlyName value to set + * @return the RecoveryPlanProperties object itself. + */ + public RecoveryPlanProperties withRecoveryFabricFriendlyName(String recoveryFabricFriendlyName) { + this.recoveryFabricFriendlyName = recoveryFabricFriendlyName; + return this; + } + + /** + * Get the failover deployment model. + * + * @return the failoverDeploymentModel value + */ + public String failoverDeploymentModel() { + return this.failoverDeploymentModel; + } + + /** + * Set the failover deployment model. + * + * @param failoverDeploymentModel the failoverDeploymentModel value to set + * @return the RecoveryPlanProperties object itself. + */ + public RecoveryPlanProperties withFailoverDeploymentModel(String failoverDeploymentModel) { + this.failoverDeploymentModel = failoverDeploymentModel; + return this; + } + + /** + * Get the list of replication providers. + * + * @return the replicationProviders value + */ + public List replicationProviders() { + return this.replicationProviders; + } + + /** + * Set the list of replication providers. + * + * @param replicationProviders the replicationProviders value to set + * @return the RecoveryPlanProperties object itself. + */ + public RecoveryPlanProperties withReplicationProviders(List replicationProviders) { + this.replicationProviders = replicationProviders; + return this; + } + + /** + * Get the list of allowed operations. + * + * @return the allowedOperations value + */ + public List allowedOperations() { + return this.allowedOperations; + } + + /** + * Set the list of allowed operations. + * + * @param allowedOperations the allowedOperations value to set + * @return the RecoveryPlanProperties object itself. + */ + public RecoveryPlanProperties withAllowedOperations(List allowedOperations) { + this.allowedOperations = allowedOperations; + return this; + } + + /** + * Get the start time of the last planned failover. + * + * @return the lastPlannedFailoverTime value + */ + public DateTime lastPlannedFailoverTime() { + return this.lastPlannedFailoverTime; + } + + /** + * Set the start time of the last planned failover. + * + * @param lastPlannedFailoverTime the lastPlannedFailoverTime value to set + * @return the RecoveryPlanProperties object itself. + */ + public RecoveryPlanProperties withLastPlannedFailoverTime(DateTime lastPlannedFailoverTime) { + this.lastPlannedFailoverTime = lastPlannedFailoverTime; + return this; + } + + /** + * Get the start time of the last unplanned failover. + * + * @return the lastUnplannedFailoverTime value + */ + public DateTime lastUnplannedFailoverTime() { + return this.lastUnplannedFailoverTime; + } + + /** + * Set the start time of the last unplanned failover. + * + * @param lastUnplannedFailoverTime the lastUnplannedFailoverTime value to set + * @return the RecoveryPlanProperties object itself. + */ + public RecoveryPlanProperties withLastUnplannedFailoverTime(DateTime lastUnplannedFailoverTime) { + this.lastUnplannedFailoverTime = lastUnplannedFailoverTime; + return this; + } + + /** + * Get the start time of the last test failover. + * + * @return the lastTestFailoverTime value + */ + public DateTime lastTestFailoverTime() { + return this.lastTestFailoverTime; + } + + /** + * Set the start time of the last test failover. + * + * @param lastTestFailoverTime the lastTestFailoverTime value to set + * @return the RecoveryPlanProperties object itself. + */ + public RecoveryPlanProperties withLastTestFailoverTime(DateTime lastTestFailoverTime) { + this.lastTestFailoverTime = lastTestFailoverTime; + return this; + } + + /** + * Get the current scenario details. + * + * @return the currentScenario value + */ + public CurrentScenarioDetails currentScenario() { + return this.currentScenario; + } + + /** + * Set the current scenario details. + * + * @param currentScenario the currentScenario value to set + * @return the RecoveryPlanProperties object itself. + */ + public RecoveryPlanProperties withCurrentScenario(CurrentScenarioDetails currentScenario) { + this.currentScenario = currentScenario; + return this; + } + + /** + * Get the recovery plan status. + * + * @return the currentScenarioStatus value + */ + public String currentScenarioStatus() { + return this.currentScenarioStatus; + } + + /** + * Set the recovery plan status. + * + * @param currentScenarioStatus the currentScenarioStatus value to set + * @return the RecoveryPlanProperties object itself. + */ + public RecoveryPlanProperties withCurrentScenarioStatus(String currentScenarioStatus) { + this.currentScenarioStatus = currentScenarioStatus; + return this; + } + + /** + * Get the recovery plan status description. + * + * @return the currentScenarioStatusDescription value + */ + public String currentScenarioStatusDescription() { + return this.currentScenarioStatusDescription; + } + + /** + * Set the recovery plan status description. + * + * @param currentScenarioStatusDescription the currentScenarioStatusDescription value to set + * @return the RecoveryPlanProperties object itself. + */ + public RecoveryPlanProperties withCurrentScenarioStatusDescription(String currentScenarioStatusDescription) { + this.currentScenarioStatusDescription = currentScenarioStatusDescription; + return this; + } + + /** + * Get the recovery plan groups. + * + * @return the groups value + */ + public List groups() { + return this.groups; + } + + /** + * Set the recovery plan groups. + * + * @param groups the groups value to set + * @return the RecoveryPlanProperties object itself. + */ + public RecoveryPlanProperties withGroups(List groups) { + this.groups = groups; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanProtectedItem.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanProtectedItem.java new file mode 100644 index 0000000000000..032cdc2048f1d --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanProtectedItem.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Recovery plan protected item. + */ +public class RecoveryPlanProtectedItem { + /** + * The ARM Id of the recovery plan protected item. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The virtual machine Id. + */ + @JsonProperty(value = "virtualMachineId") + private String virtualMachineId; + + /** + * Get the ARM Id of the recovery plan protected item. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the ARM Id of the recovery plan protected item. + * + * @param id the id value to set + * @return the RecoveryPlanProtectedItem object itself. + */ + public RecoveryPlanProtectedItem withId(String id) { + this.id = id; + return this; + } + + /** + * Get the virtual machine Id. + * + * @return the virtualMachineId value + */ + public String virtualMachineId() { + return this.virtualMachineId; + } + + /** + * Set the virtual machine Id. + * + * @param virtualMachineId the virtualMachineId value to set + * @return the RecoveryPlanProtectedItem object itself. + */ + public RecoveryPlanProtectedItem withVirtualMachineId(String virtualMachineId) { + this.virtualMachineId = virtualMachineId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanProviderSpecificFailoverInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanProviderSpecificFailoverInput.java new file mode 100644 index 0000000000000..4092cfbdd0b60 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanProviderSpecificFailoverInput.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Recovery plan provider specific failover input base class. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("RecoveryPlanProviderSpecificFailoverInput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "HyperVReplicaAzure", value = RecoveryPlanHyperVReplicaAzureFailoverInput.class), + @JsonSubTypes.Type(name = "HyperVReplicaAzureFailback", value = RecoveryPlanHyperVReplicaAzureFailbackInput.class), + @JsonSubTypes.Type(name = "InMageAzureV2", value = RecoveryPlanInMageAzureV2FailoverInput.class), + @JsonSubTypes.Type(name = "InMage", value = RecoveryPlanInMageFailoverInput.class), + @JsonSubTypes.Type(name = "A2A", value = RecoveryPlanA2AFailoverInput.class) +}) +public class RecoveryPlanProviderSpecificFailoverInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanScriptActionDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanScriptActionDetails.java new file mode 100644 index 0000000000000..d0f9bc2fb5842 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanScriptActionDetails.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Recovery plan script action details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("ScriptActionDetails") +public class RecoveryPlanScriptActionDetails extends RecoveryPlanActionDetails { + /** + * The script path. + */ + @JsonProperty(value = "path", required = true) + private String path; + + /** + * The script timeout. + */ + @JsonProperty(value = "timeout") + private String timeout; + + /** + * The fabric location. Possible values include: 'Primary', 'Recovery'. + */ + @JsonProperty(value = "fabricLocation", required = true) + private RecoveryPlanActionLocation fabricLocation; + + /** + * Get the script path. + * + * @return the path value + */ + public String path() { + return this.path; + } + + /** + * Set the script path. + * + * @param path the path value to set + * @return the RecoveryPlanScriptActionDetails object itself. + */ + public RecoveryPlanScriptActionDetails withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the script timeout. + * + * @return the timeout value + */ + public String timeout() { + return this.timeout; + } + + /** + * Set the script timeout. + * + * @param timeout the timeout value to set + * @return the RecoveryPlanScriptActionDetails object itself. + */ + public RecoveryPlanScriptActionDetails withTimeout(String timeout) { + this.timeout = timeout; + return this; + } + + /** + * Get the fabric location. Possible values include: 'Primary', 'Recovery'. + * + * @return the fabricLocation value + */ + public RecoveryPlanActionLocation fabricLocation() { + return this.fabricLocation; + } + + /** + * Set the fabric location. Possible values include: 'Primary', 'Recovery'. + * + * @param fabricLocation the fabricLocation value to set + * @return the RecoveryPlanScriptActionDetails object itself. + */ + public RecoveryPlanScriptActionDetails withFabricLocation(RecoveryPlanActionLocation fabricLocation) { + this.fabricLocation = fabricLocation; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanShutdownGroupTaskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanShutdownGroupTaskDetails.java new file mode 100644 index 0000000000000..a28a72892ea9e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanShutdownGroupTaskDetails.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * This class represents the recovery plan shutdown group task details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("RecoveryPlanShutdownGroupTaskDetails") +public class RecoveryPlanShutdownGroupTaskDetails extends GroupTaskDetails { + /** + * The name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The group identifier. + */ + @JsonProperty(value = "groupId") + private String groupId; + + /** + * The group type. + */ + @JsonProperty(value = "rpGroupType") + private String rpGroupType; + + /** + * Get the name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name. + * + * @param name the name value to set + * @return the RecoveryPlanShutdownGroupTaskDetails object itself. + */ + public RecoveryPlanShutdownGroupTaskDetails withName(String name) { + this.name = name; + return this; + } + + /** + * Get the group identifier. + * + * @return the groupId value + */ + public String groupId() { + return this.groupId; + } + + /** + * Set the group identifier. + * + * @param groupId the groupId value to set + * @return the RecoveryPlanShutdownGroupTaskDetails object itself. + */ + public RecoveryPlanShutdownGroupTaskDetails withGroupId(String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get the group type. + * + * @return the rpGroupType value + */ + public String rpGroupType() { + return this.rpGroupType; + } + + /** + * Set the group type. + * + * @param rpGroupType the rpGroupType value to set + * @return the RecoveryPlanShutdownGroupTaskDetails object itself. + */ + public RecoveryPlanShutdownGroupTaskDetails withRpGroupType(String rpGroupType) { + this.rpGroupType = rpGroupType; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanTestFailoverCleanupInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanTestFailoverCleanupInput.java new file mode 100644 index 0000000000000..0151cf3ea3b86 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanTestFailoverCleanupInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Recovery plan test failover cleanup input. + */ +public class RecoveryPlanTestFailoverCleanupInput { + /** + * The recovery plan test failover cleanup input properties. + */ + @JsonProperty(value = "properties", required = true) + private RecoveryPlanTestFailoverCleanupInputProperties properties; + + /** + * Get the recovery plan test failover cleanup input properties. + * + * @return the properties value + */ + public RecoveryPlanTestFailoverCleanupInputProperties properties() { + return this.properties; + } + + /** + * Set the recovery plan test failover cleanup input properties. + * + * @param properties the properties value to set + * @return the RecoveryPlanTestFailoverCleanupInput object itself. + */ + public RecoveryPlanTestFailoverCleanupInput withProperties(RecoveryPlanTestFailoverCleanupInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanTestFailoverCleanupInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanTestFailoverCleanupInputProperties.java new file mode 100644 index 0000000000000..01b58ed3a1f28 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanTestFailoverCleanupInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Recovery plan test failover cleanup input properties. + */ +public class RecoveryPlanTestFailoverCleanupInputProperties { + /** + * The test failover cleanup comments. + */ + @JsonProperty(value = "comments") + private String comments; + + /** + * Get the test failover cleanup comments. + * + * @return the comments value + */ + public String comments() { + return this.comments; + } + + /** + * Set the test failover cleanup comments. + * + * @param comments the comments value to set + * @return the RecoveryPlanTestFailoverCleanupInputProperties object itself. + */ + public RecoveryPlanTestFailoverCleanupInputProperties withComments(String comments) { + this.comments = comments; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanTestFailoverInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanTestFailoverInput.java new file mode 100644 index 0000000000000..e464f58d3928f --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanTestFailoverInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Recovery plan test failover input. + */ +public class RecoveryPlanTestFailoverInput { + /** + * The recovery plan test failover input properties. + */ + @JsonProperty(value = "properties", required = true) + private RecoveryPlanTestFailoverInputProperties properties; + + /** + * Get the recovery plan test failover input properties. + * + * @return the properties value + */ + public RecoveryPlanTestFailoverInputProperties properties() { + return this.properties; + } + + /** + * Set the recovery plan test failover input properties. + * + * @param properties the properties value to set + * @return the RecoveryPlanTestFailoverInput object itself. + */ + public RecoveryPlanTestFailoverInput withProperties(RecoveryPlanTestFailoverInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanTestFailoverInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanTestFailoverInputProperties.java new file mode 100644 index 0000000000000..a912871a76877 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanTestFailoverInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Recovery plan test failover input properties. + */ +public class RecoveryPlanTestFailoverInputProperties { + /** + * The failover direction. Possible values include: 'PrimaryToRecovery', + * 'RecoveryToPrimary'. + */ + @JsonProperty(value = "failoverDirection", required = true) + private PossibleOperationsDirections failoverDirection; + + /** + * The network type to be used for test failover. + */ + @JsonProperty(value = "networkType", required = true) + private String networkType; + + /** + * The Id of the network to be used for test failover. + */ + @JsonProperty(value = "networkId") + private String networkId; + + /** + * A value indicating whether the test failover cleanup is to be skipped. + */ + @JsonProperty(value = "skipTestFailoverCleanup") + private String skipTestFailoverCleanup; + + /** + * The provider specific properties. + */ + @JsonProperty(value = "providerSpecificDetails") + private List providerSpecificDetails; + + /** + * Get the failover direction. Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary'. + * + * @return the failoverDirection value + */ + public PossibleOperationsDirections failoverDirection() { + return this.failoverDirection; + } + + /** + * Set the failover direction. Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary'. + * + * @param failoverDirection the failoverDirection value to set + * @return the RecoveryPlanTestFailoverInputProperties object itself. + */ + public RecoveryPlanTestFailoverInputProperties withFailoverDirection(PossibleOperationsDirections failoverDirection) { + this.failoverDirection = failoverDirection; + return this; + } + + /** + * Get the network type to be used for test failover. + * + * @return the networkType value + */ + public String networkType() { + return this.networkType; + } + + /** + * Set the network type to be used for test failover. + * + * @param networkType the networkType value to set + * @return the RecoveryPlanTestFailoverInputProperties object itself. + */ + public RecoveryPlanTestFailoverInputProperties withNetworkType(String networkType) { + this.networkType = networkType; + return this; + } + + /** + * Get the Id of the network to be used for test failover. + * + * @return the networkId value + */ + public String networkId() { + return this.networkId; + } + + /** + * Set the Id of the network to be used for test failover. + * + * @param networkId the networkId value to set + * @return the RecoveryPlanTestFailoverInputProperties object itself. + */ + public RecoveryPlanTestFailoverInputProperties withNetworkId(String networkId) { + this.networkId = networkId; + return this; + } + + /** + * Get a value indicating whether the test failover cleanup is to be skipped. + * + * @return the skipTestFailoverCleanup value + */ + public String skipTestFailoverCleanup() { + return this.skipTestFailoverCleanup; + } + + /** + * Set a value indicating whether the test failover cleanup is to be skipped. + * + * @param skipTestFailoverCleanup the skipTestFailoverCleanup value to set + * @return the RecoveryPlanTestFailoverInputProperties object itself. + */ + public RecoveryPlanTestFailoverInputProperties withSkipTestFailoverCleanup(String skipTestFailoverCleanup) { + this.skipTestFailoverCleanup = skipTestFailoverCleanup; + return this; + } + + /** + * Get the provider specific properties. + * + * @return the providerSpecificDetails value + */ + public List providerSpecificDetails() { + return this.providerSpecificDetails; + } + + /** + * Set the provider specific properties. + * + * @param providerSpecificDetails the providerSpecificDetails value to set + * @return the RecoveryPlanTestFailoverInputProperties object itself. + */ + public RecoveryPlanTestFailoverInputProperties withProviderSpecificDetails(List providerSpecificDetails) { + this.providerSpecificDetails = providerSpecificDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanUnplannedFailoverInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanUnplannedFailoverInput.java new file mode 100644 index 0000000000000..aa6261598d544 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanUnplannedFailoverInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Recovery plan unplanned failover input. + */ +public class RecoveryPlanUnplannedFailoverInput { + /** + * The recovery plan unplanned failover input properties. + */ + @JsonProperty(value = "properties", required = true) + private RecoveryPlanUnplannedFailoverInputProperties properties; + + /** + * Get the recovery plan unplanned failover input properties. + * + * @return the properties value + */ + public RecoveryPlanUnplannedFailoverInputProperties properties() { + return this.properties; + } + + /** + * Set the recovery plan unplanned failover input properties. + * + * @param properties the properties value to set + * @return the RecoveryPlanUnplannedFailoverInput object itself. + */ + public RecoveryPlanUnplannedFailoverInput withProperties(RecoveryPlanUnplannedFailoverInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanUnplannedFailoverInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanUnplannedFailoverInputProperties.java new file mode 100644 index 0000000000000..4cea616e247b1 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPlanUnplannedFailoverInputProperties.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Recovery plan unplanned failover input properties. + */ +public class RecoveryPlanUnplannedFailoverInputProperties { + /** + * The failover direction. Possible values include: 'PrimaryToRecovery', + * 'RecoveryToPrimary'. + */ + @JsonProperty(value = "failoverDirection", required = true) + private PossibleOperationsDirections failoverDirection; + + /** + * A value indicating whether source site operations are required. Possible + * values include: 'Required', 'NotRequired'. + */ + @JsonProperty(value = "sourceSiteOperations", required = true) + private SourceSiteOperations sourceSiteOperations; + + /** + * The provider specific properties. + */ + @JsonProperty(value = "providerSpecificDetails") + private List providerSpecificDetails; + + /** + * Get the failover direction. Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary'. + * + * @return the failoverDirection value + */ + public PossibleOperationsDirections failoverDirection() { + return this.failoverDirection; + } + + /** + * Set the failover direction. Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary'. + * + * @param failoverDirection the failoverDirection value to set + * @return the RecoveryPlanUnplannedFailoverInputProperties object itself. + */ + public RecoveryPlanUnplannedFailoverInputProperties withFailoverDirection(PossibleOperationsDirections failoverDirection) { + this.failoverDirection = failoverDirection; + return this; + } + + /** + * Get a value indicating whether source site operations are required. Possible values include: 'Required', 'NotRequired'. + * + * @return the sourceSiteOperations value + */ + public SourceSiteOperations sourceSiteOperations() { + return this.sourceSiteOperations; + } + + /** + * Set a value indicating whether source site operations are required. Possible values include: 'Required', 'NotRequired'. + * + * @param sourceSiteOperations the sourceSiteOperations value to set + * @return the RecoveryPlanUnplannedFailoverInputProperties object itself. + */ + public RecoveryPlanUnplannedFailoverInputProperties withSourceSiteOperations(SourceSiteOperations sourceSiteOperations) { + this.sourceSiteOperations = sourceSiteOperations; + return this; + } + + /** + * Get the provider specific properties. + * + * @return the providerSpecificDetails value + */ + public List providerSpecificDetails() { + return this.providerSpecificDetails; + } + + /** + * Set the provider specific properties. + * + * @param providerSpecificDetails the providerSpecificDetails value to set + * @return the RecoveryPlanUnplannedFailoverInputProperties object itself. + */ + public RecoveryPlanUnplannedFailoverInputProperties withProviderSpecificDetails(List providerSpecificDetails) { + this.providerSpecificDetails = providerSpecificDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPoint.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPoint.java new file mode 100644 index 0000000000000..0d174e6aa0bb1 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPoint.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.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryPointInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; + +/** + * Type representing RecoveryPoint. + */ +public interface RecoveryPoint extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + RecoveryPointProperties properties(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPointProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPointProperties.java new file mode 100644 index 0000000000000..51ec27e861860 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPointProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Recovery point properties. + */ +public class RecoveryPointProperties { + /** + * The recovery point time. + */ + @JsonProperty(value = "recoveryPointTime") + private DateTime recoveryPointTime; + + /** + * The recovery point type: ApplicationConsistent, CrashConsistent. + */ + @JsonProperty(value = "recoveryPointType") + private String recoveryPointType; + + /** + * The provider specific details for the recovery point. + */ + @JsonProperty(value = "providerSpecificDetails") + private ProviderSpecificRecoveryPointDetails providerSpecificDetails; + + /** + * Get the recovery point time. + * + * @return the recoveryPointTime value + */ + public DateTime recoveryPointTime() { + return this.recoveryPointTime; + } + + /** + * Set the recovery point time. + * + * @param recoveryPointTime the recoveryPointTime value to set + * @return the RecoveryPointProperties object itself. + */ + public RecoveryPointProperties withRecoveryPointTime(DateTime recoveryPointTime) { + this.recoveryPointTime = recoveryPointTime; + return this; + } + + /** + * Get the recovery point type: ApplicationConsistent, CrashConsistent. + * + * @return the recoveryPointType value + */ + public String recoveryPointType() { + return this.recoveryPointType; + } + + /** + * Set the recovery point type: ApplicationConsistent, CrashConsistent. + * + * @param recoveryPointType the recoveryPointType value to set + * @return the RecoveryPointProperties object itself. + */ + public RecoveryPointProperties withRecoveryPointType(String recoveryPointType) { + this.recoveryPointType = recoveryPointType; + return this; + } + + /** + * Get the provider specific details for the recovery point. + * + * @return the providerSpecificDetails value + */ + public ProviderSpecificRecoveryPointDetails providerSpecificDetails() { + return this.providerSpecificDetails; + } + + /** + * Set the provider specific details for the recovery point. + * + * @param providerSpecificDetails the providerSpecificDetails value to set + * @return the RecoveryPointProperties object itself. + */ + public RecoveryPointProperties withProviderSpecificDetails(ProviderSpecificRecoveryPointDetails providerSpecificDetails) { + this.providerSpecificDetails = providerSpecificDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPointType.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPointType.java new file mode 100644 index 0000000000000..08ca4ce5b8262 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPointType.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for RecoveryPointType. + */ +public enum RecoveryPointType { + /** Enum value LatestTime. */ + LATEST_TIME("LatestTime"), + + /** Enum value LatestTag. */ + LATEST_TAG("LatestTag"), + + /** Enum value Custom. */ + CUSTOM("Custom"); + + /** The actual serialized value for a RecoveryPointType instance. */ + private String value; + + RecoveryPointType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a RecoveryPointType instance. + * + * @param value the serialized value to parse. + * @return the parsed RecoveryPointType object, or null if unable to parse. + */ + @JsonCreator + public static RecoveryPointType fromString(String value) { + RecoveryPointType[] items = RecoveryPointType.values(); + for (RecoveryPointType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPoints.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPoints.java new file mode 100644 index 0000000000000..10c1f2c0cfecc --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryPoints.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.recoveryservicessiterecovery.v2018_01_10; + +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryPointsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing RecoveryPoints. + */ +public interface RecoveryPoints extends HasInner { + /** + * Get a recovery point. + * Get the details of specified recovery point. + * + * @param fabricName The fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replication protected item's name. + * @param recoveryPointName The recovery point name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, String recoveryPointName); + + /** + * Get recovery points for a replication protected item. + * Lists the available recovery points for a replication protected item. + * + * @param fabricName The fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replication protected item's name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByReplicationProtectedItemsAsync(final String fabricName, final String protectionContainerName, final String replicatedProtectedItemName); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryServicesProvider.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryServicesProvider.java new file mode 100644 index 0000000000000..77628fabea5ab --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryServicesProvider.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.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesProviderInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; + +/** + * Type representing RecoveryServicesProvider. + */ +public interface RecoveryServicesProvider extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + RecoveryServicesProviderProperties properties(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryServicesProviderProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryServicesProviderProperties.java new file mode 100644 index 0000000000000..0b1aeda982e38 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RecoveryServicesProviderProperties.java @@ -0,0 +1,383 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Recovery services provider properties. + */ +public class RecoveryServicesProviderProperties { + /** + * Type of the site. + */ + @JsonProperty(value = "fabricType") + private String fabricType; + + /** + * Friendly name of the DRA. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * The provider version. + */ + @JsonProperty(value = "providerVersion") + private String providerVersion; + + /** + * The fabric provider. + */ + @JsonProperty(value = "serverVersion") + private String serverVersion; + + /** + * DRA version status. + */ + @JsonProperty(value = "providerVersionState") + private String providerVersionState; + + /** + * Expiry date if the version is deprecated. + */ + @JsonProperty(value = "providerVersionExpiryDate") + private DateTime providerVersionExpiryDate; + + /** + * The fabric friendly name. + */ + @JsonProperty(value = "fabricFriendlyName") + private String fabricFriendlyName; + + /** + * Time when last heartbeat was sent by the DRA. + */ + @JsonProperty(value = "lastHeartBeat") + private DateTime lastHeartBeat; + + /** + * A value indicating whether DRA is responsive. + */ + @JsonProperty(value = "connectionStatus") + private String connectionStatus; + + /** + * Number of protected VMs currently managed by the DRA. + */ + @JsonProperty(value = "protectedItemCount") + private Integer protectedItemCount; + + /** + * The scenarios allowed on this provider. + */ + @JsonProperty(value = "allowedScenarios") + private List allowedScenarios; + + /** + * The recovery services provider health error details. + */ + @JsonProperty(value = "healthErrorDetails") + private List healthErrorDetails; + + /** + * The DRA Id. + */ + @JsonProperty(value = "draIdentifier") + private String draIdentifier; + + /** + * The identity details. + */ + @JsonProperty(value = "identityDetails") + private IdentityInformation identityDetails; + + /** + * Get type of the site. + * + * @return the fabricType value + */ + public String fabricType() { + return this.fabricType; + } + + /** + * Set type of the site. + * + * @param fabricType the fabricType value to set + * @return the RecoveryServicesProviderProperties object itself. + */ + public RecoveryServicesProviderProperties withFabricType(String fabricType) { + this.fabricType = fabricType; + return this; + } + + /** + * Get friendly name of the DRA. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set friendly name of the DRA. + * + * @param friendlyName the friendlyName value to set + * @return the RecoveryServicesProviderProperties object itself. + */ + public RecoveryServicesProviderProperties withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the provider version. + * + * @return the providerVersion value + */ + public String providerVersion() { + return this.providerVersion; + } + + /** + * Set the provider version. + * + * @param providerVersion the providerVersion value to set + * @return the RecoveryServicesProviderProperties object itself. + */ + public RecoveryServicesProviderProperties withProviderVersion(String providerVersion) { + this.providerVersion = providerVersion; + return this; + } + + /** + * Get the fabric provider. + * + * @return the serverVersion value + */ + public String serverVersion() { + return this.serverVersion; + } + + /** + * Set the fabric provider. + * + * @param serverVersion the serverVersion value to set + * @return the RecoveryServicesProviderProperties object itself. + */ + public RecoveryServicesProviderProperties withServerVersion(String serverVersion) { + this.serverVersion = serverVersion; + return this; + } + + /** + * Get dRA version status. + * + * @return the providerVersionState value + */ + public String providerVersionState() { + return this.providerVersionState; + } + + /** + * Set dRA version status. + * + * @param providerVersionState the providerVersionState value to set + * @return the RecoveryServicesProviderProperties object itself. + */ + public RecoveryServicesProviderProperties withProviderVersionState(String providerVersionState) { + this.providerVersionState = providerVersionState; + return this; + } + + /** + * Get expiry date if the version is deprecated. + * + * @return the providerVersionExpiryDate value + */ + public DateTime providerVersionExpiryDate() { + return this.providerVersionExpiryDate; + } + + /** + * Set expiry date if the version is deprecated. + * + * @param providerVersionExpiryDate the providerVersionExpiryDate value to set + * @return the RecoveryServicesProviderProperties object itself. + */ + public RecoveryServicesProviderProperties withProviderVersionExpiryDate(DateTime providerVersionExpiryDate) { + this.providerVersionExpiryDate = providerVersionExpiryDate; + return this; + } + + /** + * Get the fabric friendly name. + * + * @return the fabricFriendlyName value + */ + public String fabricFriendlyName() { + return this.fabricFriendlyName; + } + + /** + * Set the fabric friendly name. + * + * @param fabricFriendlyName the fabricFriendlyName value to set + * @return the RecoveryServicesProviderProperties object itself. + */ + public RecoveryServicesProviderProperties withFabricFriendlyName(String fabricFriendlyName) { + this.fabricFriendlyName = fabricFriendlyName; + return this; + } + + /** + * Get time when last heartbeat was sent by the DRA. + * + * @return the lastHeartBeat value + */ + public DateTime lastHeartBeat() { + return this.lastHeartBeat; + } + + /** + * Set time when last heartbeat was sent by the DRA. + * + * @param lastHeartBeat the lastHeartBeat value to set + * @return the RecoveryServicesProviderProperties object itself. + */ + public RecoveryServicesProviderProperties withLastHeartBeat(DateTime lastHeartBeat) { + this.lastHeartBeat = lastHeartBeat; + return this; + } + + /** + * Get a value indicating whether DRA is responsive. + * + * @return the connectionStatus value + */ + public String connectionStatus() { + return this.connectionStatus; + } + + /** + * Set a value indicating whether DRA is responsive. + * + * @param connectionStatus the connectionStatus value to set + * @return the RecoveryServicesProviderProperties object itself. + */ + public RecoveryServicesProviderProperties withConnectionStatus(String connectionStatus) { + this.connectionStatus = connectionStatus; + return this; + } + + /** + * Get number of protected VMs currently managed by the DRA. + * + * @return the protectedItemCount value + */ + public Integer protectedItemCount() { + return this.protectedItemCount; + } + + /** + * Set number of protected VMs currently managed by the DRA. + * + * @param protectedItemCount the protectedItemCount value to set + * @return the RecoveryServicesProviderProperties object itself. + */ + public RecoveryServicesProviderProperties withProtectedItemCount(Integer protectedItemCount) { + this.protectedItemCount = protectedItemCount; + return this; + } + + /** + * Get the scenarios allowed on this provider. + * + * @return the allowedScenarios value + */ + public List allowedScenarios() { + return this.allowedScenarios; + } + + /** + * Set the scenarios allowed on this provider. + * + * @param allowedScenarios the allowedScenarios value to set + * @return the RecoveryServicesProviderProperties object itself. + */ + public RecoveryServicesProviderProperties withAllowedScenarios(List allowedScenarios) { + this.allowedScenarios = allowedScenarios; + return this; + } + + /** + * Get the recovery services provider health error details. + * + * @return the healthErrorDetails value + */ + public List healthErrorDetails() { + return this.healthErrorDetails; + } + + /** + * Set the recovery services provider health error details. + * + * @param healthErrorDetails the healthErrorDetails value to set + * @return the RecoveryServicesProviderProperties object itself. + */ + public RecoveryServicesProviderProperties withHealthErrorDetails(List healthErrorDetails) { + this.healthErrorDetails = healthErrorDetails; + return this; + } + + /** + * Get the DRA Id. + * + * @return the draIdentifier value + */ + public String draIdentifier() { + return this.draIdentifier; + } + + /** + * Set the DRA Id. + * + * @param draIdentifier the draIdentifier value to set + * @return the RecoveryServicesProviderProperties object itself. + */ + public RecoveryServicesProviderProperties withDraIdentifier(String draIdentifier) { + this.draIdentifier = draIdentifier; + return this; + } + + /** + * Get the identity details. + * + * @return the identityDetails value + */ + public IdentityInformation identityDetails() { + return this.identityDetails; + } + + /** + * Set the identity details. + * + * @param identityDetails the identityDetails value to set + * @return the RecoveryServicesProviderProperties object itself. + */ + public RecoveryServicesProviderProperties withIdentityDetails(IdentityInformation identityDetails) { + this.identityDetails = identityDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RemoveProtectionContainerMappingInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RemoveProtectionContainerMappingInput.java new file mode 100644 index 0000000000000..7172a554035cc --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RemoveProtectionContainerMappingInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Container unpairing input. + */ +public class RemoveProtectionContainerMappingInput { + /** + * Configure protection input properties. + */ + @JsonProperty(value = "properties") + private RemoveProtectionContainerMappingInputProperties properties; + + /** + * Get configure protection input properties. + * + * @return the properties value + */ + public RemoveProtectionContainerMappingInputProperties properties() { + return this.properties; + } + + /** + * Set configure protection input properties. + * + * @param properties the properties value to set + * @return the RemoveProtectionContainerMappingInput object itself. + */ + public RemoveProtectionContainerMappingInput withProperties(RemoveProtectionContainerMappingInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RemoveProtectionContainerMappingInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RemoveProtectionContainerMappingInputProperties.java new file mode 100644 index 0000000000000..599534eda85c9 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RemoveProtectionContainerMappingInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Unpairing input properties. + */ +public class RemoveProtectionContainerMappingInputProperties { + /** + * Provider specific input for unpairing. + */ + @JsonProperty(value = "providerSpecificInput") + private ReplicationProviderContainerUnmappingInput providerSpecificInput; + + /** + * Get provider specific input for unpairing. + * + * @return the providerSpecificInput value + */ + public ReplicationProviderContainerUnmappingInput providerSpecificInput() { + return this.providerSpecificInput; + } + + /** + * Set provider specific input for unpairing. + * + * @param providerSpecificInput the providerSpecificInput value to set + * @return the RemoveProtectionContainerMappingInputProperties object itself. + */ + public RemoveProtectionContainerMappingInputProperties withProviderSpecificInput(ReplicationProviderContainerUnmappingInput providerSpecificInput) { + this.providerSpecificInput = providerSpecificInput; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RenewCertificateInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RenewCertificateInput.java new file mode 100644 index 0000000000000..caf95aa2d0bfa --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RenewCertificateInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Certificate renewal input. + */ +public class RenewCertificateInput { + /** + * Renew certificate input properties. + */ + @JsonProperty(value = "properties") + private RenewCertificateInputProperties properties; + + /** + * Get renew certificate input properties. + * + * @return the properties value + */ + public RenewCertificateInputProperties properties() { + return this.properties; + } + + /** + * Set renew certificate input properties. + * + * @param properties the properties value to set + * @return the RenewCertificateInput object itself. + */ + public RenewCertificateInput withProperties(RenewCertificateInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RenewCertificateInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RenewCertificateInputProperties.java new file mode 100644 index 0000000000000..da79644c59f8f --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RenewCertificateInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Renew Certificate input properties. + */ +public class RenewCertificateInputProperties { + /** + * Renew certificate type. + */ + @JsonProperty(value = "renewCertificateType") + private String renewCertificateType; + + /** + * Get renew certificate type. + * + * @return the renewCertificateType value + */ + public String renewCertificateType() { + return this.renewCertificateType; + } + + /** + * Set renew certificate type. + * + * @param renewCertificateType the renewCertificateType value to set + * @return the RenewCertificateInputProperties object itself. + */ + public RenewCertificateInputProperties withRenewCertificateType(String renewCertificateType) { + this.renewCertificateType = renewCertificateType; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationAlertSettings.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationAlertSettings.java new file mode 100644 index 0000000000000..7f55efac5f4b5 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationAlertSettings.java @@ -0,0 +1,39 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationAlertSettingsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReplicationAlertSettings. + */ +public interface ReplicationAlertSettings extends SupportsCreating, HasInner { + /** + * Gets an email notification(alert) configuration. + * Gets the details of the specified email notification(alert) configuration. + * + * @param alertSettingName The name of the email notification configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String alertSettingName); + + /** + * Gets the list of configured email notification(alert) configurations. + * Gets the list of email notification(alert) configurations for the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationEvents.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationEvents.java new file mode 100644 index 0000000000000..d10720d10306b --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationEvents.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationEventsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReplicationEvents. + */ +public interface ReplicationEvents extends HasInner { + /** + * Get the details of an Azure Site recovery event. + * The operation to get the details of an Azure Site recovery event. + * + * @param eventName The name of the Azure Site Recovery event. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String eventName); + + /** + * Gets the list of Azure Site Recovery events. + * Gets the list of Azure Site Recovery events for the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationFabrics.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationFabrics.java new file mode 100644 index 0000000000000..a7f94e4a093c1 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationFabrics.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationFabricsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReplicationFabrics. + */ +public interface ReplicationFabrics extends SupportsCreating, HasInner { + /** + * Migrates the site to AAD. + * The operation to migrate an Azure Site Recovery fabric to AAD. + * + * @param fabricName ASR fabric to migrate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable migrateToAadAsync(String fabricName); + + /** + * Renews certificate for the fabric. + * Renews the connection certificate for the ASR replication fabric. + * + * @param fabricName fabric name to renew certs for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable renewCertificateAsync(String fabricName); + + /** + * Perform failover of the process server. + * The operation to move replications from a process server to another process server. + * + * @param fabricName The name of the fabric containing the process server. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable reassociateGatewayAsync(String fabricName); + + /** + * Checks the consistency of the ASR fabric. + * The operation to perform a consistency check on the fabric. + * + * @param fabricName Fabric name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkConsistencyAsync(String fabricName); + + /** + * Deletes the site. + * The operation to delete or remove an Azure Site Recovery fabric. + * + * @param fabricName ASR fabric to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String fabricName); + + /** + * Gets the details of an ASR fabric. + * Gets the details of an Azure Site Recovery fabric. + * + * @param fabricName Fabric name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String fabricName); + + /** + * Gets the list of ASR fabrics. + * Gets a list of the Azure Site Recovery fabrics in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Purges the site. + * The operation to purge(force delete) an Azure Site Recovery fabric. + * + * @param fabricName ASR fabric to purge. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable purgeAsync(String fabricName); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationGroupDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationGroupDetails.java new file mode 100644 index 0000000000000..19e2bc6887f98 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationGroupDetails.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Replication group details. This will be used in case of San and Wvr. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("ReplicationGroupDetails") +public class ReplicationGroupDetails extends ConfigurationSettings { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationJobs.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationJobs.java new file mode 100644 index 0000000000000..3655e6be38ebd --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationJobs.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationJobsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReplicationJobs. + */ +public interface ReplicationJobs extends HasInner { + /** + * Resumes the specified job. + * The operation to resume an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable resumeAsync(String jobName); + + /** + * Restarts the specified job. + * The operation to restart an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable restartAsync(String jobName); + + /** + * Cancels the specified job. + * The operation to cancel an Azure Site Recovery job. + * + * @param jobName Job indentifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable cancelAsync(String jobName); + + /** + * Exports the details of the Azure Site Recovery jobs of the vault. + * The operation to export the details of the Azure Site Recovery jobs of the vault. + * + * @param jobQueryParameter job query filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable exportAsync(JobQueryParameter jobQueryParameter); + + /** + * Gets the job details. + * Get the details of an Azure Site Recovery job. + * + * @param jobName Job identifier + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String jobName); + + /** + * Gets the list of jobs. + * Gets the list of Azure Site Recovery Jobs for the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationLogicalNetworks.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationLogicalNetworks.java new file mode 100644 index 0000000000000..28cd7b6c0d15e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationLogicalNetworks.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationLogicalNetworksInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReplicationLogicalNetworks. + */ +public interface ReplicationLogicalNetworks extends HasInner { + /** + * Gets a logical network with specified server id and logical network name. + * Gets the details of a logical network. + * + * @param fabricName Server Id. + * @param logicalNetworkName Logical network name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String fabricName, String logicalNetworkName); + + /** + * Gets the list of logical networks under a fabric. + * Lists all the logical networks of the Azure Site Recovery fabric. + * + * @param fabricName Server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByReplicationFabricsAsync(final String fabricName); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationNetworkMappings.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationNetworkMappings.java new file mode 100644 index 0000000000000..1f45833a6a69f --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationNetworkMappings.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Observable; +import rx.Completable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationNetworkMappingsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReplicationNetworkMappings. + */ +public interface ReplicationNetworkMappings extends SupportsCreating, HasInner { + /** + * Gets all the network mappings under a network. + * Lists all ASR network mappings for the specified network. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByReplicationNetworksAsync(final String fabricName, final String networkName); + + /** + * Gets network mapping by name. + * Gets the details of an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String fabricName, String networkName, String networkMappingName); + + /** + * Delete network mapping. + * The operation to delete a network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName ARM Resource Name for network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String fabricName, String networkName, String networkMappingName); + + /** + * Gets all the network mappings under a vault. + * Lists all ASR network mappings in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationNetworks.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationNetworks.java new file mode 100644 index 0000000000000..7e2f307885dc2 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationNetworks.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationNetworksInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReplicationNetworks. + */ +public interface ReplicationNetworks extends HasInner { + /** + * Gets the list of networks under a fabric. + * Lists the networks available for a fabric. + * + * @param fabricName Fabric name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByReplicationFabricsAsync(final String fabricName); + + /** + * Gets a network with specified server id and network name. + * Gets the details of a network. + * + * @param fabricName Server Id. + * @param networkName Primary network name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String fabricName, String networkName); + + /** + * Gets the list of networks. View-only API. + * Lists the networks available in a vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationPolicies.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationPolicies.java new file mode 100644 index 0000000000000..edc7688454248 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationPolicies.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.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationPoliciesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReplicationPolicies. + */ +public interface ReplicationPolicies extends SupportsCreating, HasInner { + /** + * Gets the requested policy. + * Gets the details of a replication policy. + * + * @param policyName Replication policy name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String policyName); + + /** + * Gets the list of replication policies. + * Lists the replication policies for a vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Delete the policy. + * The operation to delete a replication policy. + * + * @param policyName Replication policy name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String policyName); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectableItems.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectableItems.java new file mode 100644 index 0000000000000..22496b72ca6c4 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectableItems.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationProtectableItemsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReplicationProtectableItems. + */ +public interface ReplicationProtectableItems extends HasInner { + /** + * Gets the details of a protectable item. + * The operation to get the details of a protectable item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param protectableItemName Protectable item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String fabricName, String protectionContainerName, String protectableItemName); + + /** + * Gets the list of protectable items. + * Lists the protectable items in a protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByReplicationProtectionContainersAsync(final String fabricName, final String protectionContainerName); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectedItem.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectedItem.java new file mode 100644 index 0000000000000..a484407f320c4 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectedItem.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.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationProtectedItemInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; + +/** + * Type representing ReplicationProtectedItem. + */ +public interface ReplicationProtectedItem extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + ReplicationProtectedItemProperties properties(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the ReplicationProtectedItem definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithReplicationProtectionContainer, DefinitionStages.WithCreate { + } + + /** + * Grouping of ReplicationProtectedItem definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ReplicationProtectedItem definition. + */ + interface Blank extends WithReplicationProtectionContainer { + } + + /** + * The stage of the replicationprotecteditem definition allowing to specify ReplicationProtectionContainer. + */ + interface WithReplicationProtectionContainer { + /** + * Specifies fabricName, protectionContainerName. + */ + WithCreate withExistingReplicationProtectionContainer(String fabricName, String protectionContainerName); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a ReplicationProtectedItem update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable { + } + + /** + * Grouping of ReplicationProtectedItem update stages. + */ + interface UpdateStages { + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectedItemOperation.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectedItemOperation.java new file mode 100644 index 0000000000000..c1f36be24d7a2 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectedItemOperation.java @@ -0,0 +1,86 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ReplicationProtectedItemOperation. + */ +public enum ReplicationProtectedItemOperation { + /** Enum value ReverseReplicate. */ + REVERSE_REPLICATE("ReverseReplicate"), + + /** Enum value Commit. */ + COMMIT("Commit"), + + /** Enum value PlannedFailover. */ + PLANNED_FAILOVER("PlannedFailover"), + + /** Enum value UnplannedFailover. */ + UNPLANNED_FAILOVER("UnplannedFailover"), + + /** Enum value DisableProtection. */ + DISABLE_PROTECTION("DisableProtection"), + + /** Enum value TestFailover. */ + TEST_FAILOVER("TestFailover"), + + /** Enum value TestFailoverCleanup. */ + TEST_FAILOVER_CLEANUP("TestFailoverCleanup"), + + /** Enum value Failback. */ + FAILBACK("Failback"), + + /** Enum value FinalizeFailback. */ + FINALIZE_FAILBACK("FinalizeFailback"), + + /** Enum value ChangePit. */ + CHANGE_PIT("ChangePit"), + + /** Enum value RepairReplication. */ + REPAIR_REPLICATION("RepairReplication"), + + /** Enum value SwitchProtection. */ + SWITCH_PROTECTION("SwitchProtection"), + + /** Enum value CompleteMigration. */ + COMPLETE_MIGRATION("CompleteMigration"); + + /** The actual serialized value for a ReplicationProtectedItemOperation instance. */ + private String value; + + ReplicationProtectedItemOperation(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ReplicationProtectedItemOperation instance. + * + * @param value the serialized value to parse. + * @return the parsed ReplicationProtectedItemOperation object, or null if unable to parse. + */ + @JsonCreator + public static ReplicationProtectedItemOperation fromString(String value) { + ReplicationProtectedItemOperation[] items = ReplicationProtectedItemOperation.values(); + for (ReplicationProtectedItemOperation item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectedItemProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectedItemProperties.java new file mode 100644 index 0000000000000..3cdc301dc32cb --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectedItemProperties.java @@ -0,0 +1,724 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Replication protected item custom data details. + */ +public class ReplicationProtectedItemProperties { + /** + * The name. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * The type of protected item type. + */ + @JsonProperty(value = "protectedItemType") + private String protectedItemType; + + /** + * The protected item ARM Id. + */ + @JsonProperty(value = "protectableItemId") + private String protectableItemId; + + /** + * The recovery provider ARM Id. + */ + @JsonProperty(value = "recoveryServicesProviderId") + private String recoveryServicesProviderId; + + /** + * The friendly name of the primary fabric. + */ + @JsonProperty(value = "primaryFabricFriendlyName") + private String primaryFabricFriendlyName; + + /** + * The friendly name of recovery fabric. + */ + @JsonProperty(value = "recoveryFabricFriendlyName") + private String recoveryFabricFriendlyName; + + /** + * The Arm Id of recovery fabric. + */ + @JsonProperty(value = "recoveryFabricId") + private String recoveryFabricId; + + /** + * The name of primary protection container friendly name. + */ + @JsonProperty(value = "primaryProtectionContainerFriendlyName") + private String primaryProtectionContainerFriendlyName; + + /** + * The name of recovery container friendly name. + */ + @JsonProperty(value = "recoveryProtectionContainerFriendlyName") + private String recoveryProtectionContainerFriendlyName; + + /** + * The protection status. + */ + @JsonProperty(value = "protectionState") + private String protectionState; + + /** + * The protection state description. + */ + @JsonProperty(value = "protectionStateDescription") + private String protectionStateDescription; + + /** + * The Current active location of the PE. + */ + @JsonProperty(value = "activeLocation") + private String activeLocation; + + /** + * The Test failover state. + */ + @JsonProperty(value = "testFailoverState") + private String testFailoverState; + + /** + * The Test failover state description. + */ + @JsonProperty(value = "testFailoverStateDescription") + private String testFailoverStateDescription; + + /** + * The allowed operations on the Replication protected item. + */ + @JsonProperty(value = "allowedOperations") + private List allowedOperations; + + /** + * The consolidated protection health for the VM taking any issues with SRS + * as well as all the replication units associated with the VM's + * replication group into account. This is a string representation of the + * ProtectionHealth enumeration. + */ + @JsonProperty(value = "replicationHealth") + private String replicationHealth; + + /** + * The consolidated failover health for the VM. + */ + @JsonProperty(value = "failoverHealth") + private String failoverHealth; + + /** + * List of replication health errors. + */ + @JsonProperty(value = "replicationHealthErrors") + private List replicationHealthErrors; + + /** + * List of failover health errors. + */ + @JsonProperty(value = "failoverHealthErrors") + private List failoverHealthErrors; + + /** + * The ID of Policy governing this PE. + */ + @JsonProperty(value = "policyId") + private String policyId; + + /** + * The name of Policy governing this PE. + */ + @JsonProperty(value = "policyFriendlyName") + private String policyFriendlyName; + + /** + * The Last successful failover time. + */ + @JsonProperty(value = "lastSuccessfulFailoverTime") + private DateTime lastSuccessfulFailoverTime; + + /** + * The Last successful test failover time. + */ + @JsonProperty(value = "lastSuccessfulTestFailoverTime") + private DateTime lastSuccessfulTestFailoverTime; + + /** + * The current scenario. + */ + @JsonProperty(value = "currentScenario") + private CurrentScenarioDetails currentScenario; + + /** + * The recovery point ARM Id to which the Vm was failed over. + */ + @JsonProperty(value = "failoverRecoveryPointId") + private String failoverRecoveryPointId; + + /** + * The Replication provider custom settings. + */ + @JsonProperty(value = "providerSpecificDetails") + private ReplicationProviderSpecificSettings providerSpecificDetails; + + /** + * The recovery container Id. + */ + @JsonProperty(value = "recoveryContainerId") + private String recoveryContainerId; + + /** + * Get the name. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the name. + * + * @param friendlyName the friendlyName value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the type of protected item type. + * + * @return the protectedItemType value + */ + public String protectedItemType() { + return this.protectedItemType; + } + + /** + * Set the type of protected item type. + * + * @param protectedItemType the protectedItemType value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withProtectedItemType(String protectedItemType) { + this.protectedItemType = protectedItemType; + return this; + } + + /** + * Get the protected item ARM Id. + * + * @return the protectableItemId value + */ + public String protectableItemId() { + return this.protectableItemId; + } + + /** + * Set the protected item ARM Id. + * + * @param protectableItemId the protectableItemId value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withProtectableItemId(String protectableItemId) { + this.protectableItemId = protectableItemId; + return this; + } + + /** + * Get the recovery provider ARM Id. + * + * @return the recoveryServicesProviderId value + */ + public String recoveryServicesProviderId() { + return this.recoveryServicesProviderId; + } + + /** + * Set the recovery provider ARM Id. + * + * @param recoveryServicesProviderId the recoveryServicesProviderId value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withRecoveryServicesProviderId(String recoveryServicesProviderId) { + this.recoveryServicesProviderId = recoveryServicesProviderId; + return this; + } + + /** + * Get the friendly name of the primary fabric. + * + * @return the primaryFabricFriendlyName value + */ + public String primaryFabricFriendlyName() { + return this.primaryFabricFriendlyName; + } + + /** + * Set the friendly name of the primary fabric. + * + * @param primaryFabricFriendlyName the primaryFabricFriendlyName value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withPrimaryFabricFriendlyName(String primaryFabricFriendlyName) { + this.primaryFabricFriendlyName = primaryFabricFriendlyName; + return this; + } + + /** + * Get the friendly name of recovery fabric. + * + * @return the recoveryFabricFriendlyName value + */ + public String recoveryFabricFriendlyName() { + return this.recoveryFabricFriendlyName; + } + + /** + * Set the friendly name of recovery fabric. + * + * @param recoveryFabricFriendlyName the recoveryFabricFriendlyName value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withRecoveryFabricFriendlyName(String recoveryFabricFriendlyName) { + this.recoveryFabricFriendlyName = recoveryFabricFriendlyName; + return this; + } + + /** + * Get the Arm Id of recovery fabric. + * + * @return the recoveryFabricId value + */ + public String recoveryFabricId() { + return this.recoveryFabricId; + } + + /** + * Set the Arm Id of recovery fabric. + * + * @param recoveryFabricId the recoveryFabricId value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withRecoveryFabricId(String recoveryFabricId) { + this.recoveryFabricId = recoveryFabricId; + return this; + } + + /** + * Get the name of primary protection container friendly name. + * + * @return the primaryProtectionContainerFriendlyName value + */ + public String primaryProtectionContainerFriendlyName() { + return this.primaryProtectionContainerFriendlyName; + } + + /** + * Set the name of primary protection container friendly name. + * + * @param primaryProtectionContainerFriendlyName the primaryProtectionContainerFriendlyName value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withPrimaryProtectionContainerFriendlyName(String primaryProtectionContainerFriendlyName) { + this.primaryProtectionContainerFriendlyName = primaryProtectionContainerFriendlyName; + return this; + } + + /** + * Get the name of recovery container friendly name. + * + * @return the recoveryProtectionContainerFriendlyName value + */ + public String recoveryProtectionContainerFriendlyName() { + return this.recoveryProtectionContainerFriendlyName; + } + + /** + * Set the name of recovery container friendly name. + * + * @param recoveryProtectionContainerFriendlyName the recoveryProtectionContainerFriendlyName value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withRecoveryProtectionContainerFriendlyName(String recoveryProtectionContainerFriendlyName) { + this.recoveryProtectionContainerFriendlyName = recoveryProtectionContainerFriendlyName; + return this; + } + + /** + * Get the protection status. + * + * @return the protectionState value + */ + public String protectionState() { + return this.protectionState; + } + + /** + * Set the protection status. + * + * @param protectionState the protectionState value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withProtectionState(String protectionState) { + this.protectionState = protectionState; + return this; + } + + /** + * Get the protection state description. + * + * @return the protectionStateDescription value + */ + public String protectionStateDescription() { + return this.protectionStateDescription; + } + + /** + * Set the protection state description. + * + * @param protectionStateDescription the protectionStateDescription value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withProtectionStateDescription(String protectionStateDescription) { + this.protectionStateDescription = protectionStateDescription; + return this; + } + + /** + * Get the Current active location of the PE. + * + * @return the activeLocation value + */ + public String activeLocation() { + return this.activeLocation; + } + + /** + * Set the Current active location of the PE. + * + * @param activeLocation the activeLocation value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withActiveLocation(String activeLocation) { + this.activeLocation = activeLocation; + return this; + } + + /** + * Get the Test failover state. + * + * @return the testFailoverState value + */ + public String testFailoverState() { + return this.testFailoverState; + } + + /** + * Set the Test failover state. + * + * @param testFailoverState the testFailoverState value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withTestFailoverState(String testFailoverState) { + this.testFailoverState = testFailoverState; + return this; + } + + /** + * Get the Test failover state description. + * + * @return the testFailoverStateDescription value + */ + public String testFailoverStateDescription() { + return this.testFailoverStateDescription; + } + + /** + * Set the Test failover state description. + * + * @param testFailoverStateDescription the testFailoverStateDescription value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withTestFailoverStateDescription(String testFailoverStateDescription) { + this.testFailoverStateDescription = testFailoverStateDescription; + return this; + } + + /** + * Get the allowed operations on the Replication protected item. + * + * @return the allowedOperations value + */ + public List allowedOperations() { + return this.allowedOperations; + } + + /** + * Set the allowed operations on the Replication protected item. + * + * @param allowedOperations the allowedOperations value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withAllowedOperations(List allowedOperations) { + this.allowedOperations = allowedOperations; + return this; + } + + /** + * Get the consolidated protection health for the VM taking any issues with SRS as well as all the replication units associated with the VM's replication group into account. This is a string representation of the ProtectionHealth enumeration. + * + * @return the replicationHealth value + */ + public String replicationHealth() { + return this.replicationHealth; + } + + /** + * Set the consolidated protection health for the VM taking any issues with SRS as well as all the replication units associated with the VM's replication group into account. This is a string representation of the ProtectionHealth enumeration. + * + * @param replicationHealth the replicationHealth value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withReplicationHealth(String replicationHealth) { + this.replicationHealth = replicationHealth; + return this; + } + + /** + * Get the consolidated failover health for the VM. + * + * @return the failoverHealth value + */ + public String failoverHealth() { + return this.failoverHealth; + } + + /** + * Set the consolidated failover health for the VM. + * + * @param failoverHealth the failoverHealth value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withFailoverHealth(String failoverHealth) { + this.failoverHealth = failoverHealth; + return this; + } + + /** + * Get list of replication health errors. + * + * @return the replicationHealthErrors value + */ + public List replicationHealthErrors() { + return this.replicationHealthErrors; + } + + /** + * Set list of replication health errors. + * + * @param replicationHealthErrors the replicationHealthErrors value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withReplicationHealthErrors(List replicationHealthErrors) { + this.replicationHealthErrors = replicationHealthErrors; + return this; + } + + /** + * Get list of failover health errors. + * + * @return the failoverHealthErrors value + */ + public List failoverHealthErrors() { + return this.failoverHealthErrors; + } + + /** + * Set list of failover health errors. + * + * @param failoverHealthErrors the failoverHealthErrors value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withFailoverHealthErrors(List failoverHealthErrors) { + this.failoverHealthErrors = failoverHealthErrors; + return this; + } + + /** + * Get the ID of Policy governing this PE. + * + * @return the policyId value + */ + public String policyId() { + return this.policyId; + } + + /** + * Set the ID of Policy governing this PE. + * + * @param policyId the policyId value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withPolicyId(String policyId) { + this.policyId = policyId; + return this; + } + + /** + * Get the name of Policy governing this PE. + * + * @return the policyFriendlyName value + */ + public String policyFriendlyName() { + return this.policyFriendlyName; + } + + /** + * Set the name of Policy governing this PE. + * + * @param policyFriendlyName the policyFriendlyName value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withPolicyFriendlyName(String policyFriendlyName) { + this.policyFriendlyName = policyFriendlyName; + return this; + } + + /** + * Get the Last successful failover time. + * + * @return the lastSuccessfulFailoverTime value + */ + public DateTime lastSuccessfulFailoverTime() { + return this.lastSuccessfulFailoverTime; + } + + /** + * Set the Last successful failover time. + * + * @param lastSuccessfulFailoverTime the lastSuccessfulFailoverTime value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withLastSuccessfulFailoverTime(DateTime lastSuccessfulFailoverTime) { + this.lastSuccessfulFailoverTime = lastSuccessfulFailoverTime; + return this; + } + + /** + * Get the Last successful test failover time. + * + * @return the lastSuccessfulTestFailoverTime value + */ + public DateTime lastSuccessfulTestFailoverTime() { + return this.lastSuccessfulTestFailoverTime; + } + + /** + * Set the Last successful test failover time. + * + * @param lastSuccessfulTestFailoverTime the lastSuccessfulTestFailoverTime value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withLastSuccessfulTestFailoverTime(DateTime lastSuccessfulTestFailoverTime) { + this.lastSuccessfulTestFailoverTime = lastSuccessfulTestFailoverTime; + return this; + } + + /** + * Get the current scenario. + * + * @return the currentScenario value + */ + public CurrentScenarioDetails currentScenario() { + return this.currentScenario; + } + + /** + * Set the current scenario. + * + * @param currentScenario the currentScenario value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withCurrentScenario(CurrentScenarioDetails currentScenario) { + this.currentScenario = currentScenario; + return this; + } + + /** + * Get the recovery point ARM Id to which the Vm was failed over. + * + * @return the failoverRecoveryPointId value + */ + public String failoverRecoveryPointId() { + return this.failoverRecoveryPointId; + } + + /** + * Set the recovery point ARM Id to which the Vm was failed over. + * + * @param failoverRecoveryPointId the failoverRecoveryPointId value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withFailoverRecoveryPointId(String failoverRecoveryPointId) { + this.failoverRecoveryPointId = failoverRecoveryPointId; + return this; + } + + /** + * Get the Replication provider custom settings. + * + * @return the providerSpecificDetails value + */ + public ReplicationProviderSpecificSettings providerSpecificDetails() { + return this.providerSpecificDetails; + } + + /** + * Set the Replication provider custom settings. + * + * @param providerSpecificDetails the providerSpecificDetails value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withProviderSpecificDetails(ReplicationProviderSpecificSettings providerSpecificDetails) { + this.providerSpecificDetails = providerSpecificDetails; + return this; + } + + /** + * Get the recovery container Id. + * + * @return the recoveryContainerId value + */ + public String recoveryContainerId() { + return this.recoveryContainerId; + } + + /** + * Set the recovery container Id. + * + * @param recoveryContainerId the recoveryContainerId value to set + * @return the ReplicationProtectedItemProperties object itself. + */ + public ReplicationProtectedItemProperties withRecoveryContainerId(String recoveryContainerId) { + this.recoveryContainerId = recoveryContainerId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectedItems.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectedItems.java new file mode 100644 index 0000000000000..f468e3778c084 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectedItems.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationProtectedItemsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReplicationProtectedItems. + */ +public interface ReplicationProtectedItems extends SupportsCreating, HasInner { + /** + * Gets the list of replication protected items. + * Gets the list of ASR replication protected items in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Change or apply recovery point. + * The operation to change the recovery point of a failed over replication protected item. + * + * @param fabricName The ARM fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replicated protected item's name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable applyRecoveryPointAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName); + + /** + * Resynchronize or repair replication. + * The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the container. + * @param replicatedProtectedItemName The name of the replication protected item. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable repairReplicationAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName); + + /** + * Update the mobility service on a protected item. + * The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + * + * @param fabricName The name of the fabric containing the protected item. + * @param protectionContainerName The name of the container containing the protected item. + * @param replicationProtectedItemName The name of the protected item on which the agent is to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable updateMobilityServiceAsync(String fabricName, String protectionContainerName, String replicationProtectedItemName); + + /** + * Execute Reverse Replication\Reprotect. + * Operation to reprotect or reverse replicate a failed over replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable reprotectAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName); + + /** + * Execute commit failover. + * Operation to commit the failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable failoverCommitAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName); + + /** + * Execute test failover cleanup. + * Operation to clean up the test failover of a replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Test failover cleanup input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable testFailoverCleanupAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, TestFailoverCleanupInputProperties properties); + + /** + * Execute test failover. + * Operation to perform a test failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable testFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName); + + /** + * Execute unplanned failover. + * Operation to initiate a failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable unplannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName); + + /** + * Execute planned failover. + * Operation to initiate a planned failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable plannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName); + + /** + * Disables protection. + * The operation to disable replication on a replication protected item. This will also remove the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName); + + /** + * Gets the details of a Replication protected item. + * Gets the details of an ASR replication protected item. + * + * @param fabricName Fabric unique name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName); + + /** + * Gets the list of Replication protected items. + * Gets the list of ASR replication protected items in the protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByReplicationProtectionContainersAsync(final String fabricName, final String protectionContainerName); + + /** + * Purges protection. + * The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable purgeAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectionContainerMappings.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectionContainerMappings.java new file mode 100644 index 0000000000000..914a7d6d0f5e6 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectionContainerMappings.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationProtectionContainerMappingsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReplicationProtectionContainerMappings. + */ +public interface ReplicationProtectionContainerMappings extends SupportsCreating, HasInner { + /** + * Remove protection container mapping. + * The operation to delete or remove a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String fabricName, String protectionContainerName, String mappingName); + + /** + * Gets the list of all protection container mappings in a vault. + * Lists the protection container mappings in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Gets a protection container mapping/. + * Gets the details of a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection Container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String fabricName, String protectionContainerName, String mappingName); + + /** + * Gets the list of protection container mappings for a protection container. + * Lists the protection container mappings for a protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByReplicationProtectionContainersAsync(final String fabricName, final String protectionContainerName); + + /** + * Purge protection container mapping. + * The operation to purge(force delete) a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable purgeAsync(String fabricName, String protectionContainerName, String mappingName); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectionContainers.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectionContainers.java new file mode 100644 index 0000000000000..0dd1b2e17041f --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProtectionContainers.java @@ -0,0 +1,84 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Observable; +import rx.Completable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationProtectionContainersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReplicationProtectionContainers. + */ +public interface ReplicationProtectionContainers extends SupportsCreating, HasInner { + /** + * Switches protection from one container to another or one replication provider to another. + * Operation to switch protection from one container to another or one replication provider to another. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable switchProtectionAsync(String fabricName, String protectionContainerName); + + /** + * Removes a protection container. + * Operation to remove a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String fabricName, String protectionContainerName); + + /** + * Adds a protectable item to the replication protection container. + * The operation to a add a protectable item to a protection container(Add physical server.). + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the protection container. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable discoverProtectableItemAsync(String fabricName, String protectionContainerName); + + /** + * Gets the list of all protection containers in a vault. + * Lists the protection containers in a vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Gets the protection container details. + * Gets the details of a protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String fabricName, String protectionContainerName); + + /** + * Gets the list of protection container for a fabric. + * Lists the protection containers in the specified fabric. + * + * @param fabricName Fabric name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByReplicationFabricsAsync(final String fabricName); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProviderContainerUnmappingInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProviderContainerUnmappingInput.java new file mode 100644 index 0000000000000..45b67bbaeaf14 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProviderContainerUnmappingInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Provider specific input for unpairing operations. + */ +public class ReplicationProviderContainerUnmappingInput { + /** + * The class type. + */ + @JsonProperty(value = "instanceType") + private String instanceType; + + /** + * Get the class type. + * + * @return the instanceType value + */ + public String instanceType() { + return this.instanceType; + } + + /** + * Set the class type. + * + * @param instanceType the instanceType value to set + * @return the ReplicationProviderContainerUnmappingInput object itself. + */ + public ReplicationProviderContainerUnmappingInput withInstanceType(String instanceType) { + this.instanceType = instanceType; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProviderSpecificContainerCreationInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProviderSpecificContainerCreationInput.java new file mode 100644 index 0000000000000..d78dd07a22411 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProviderSpecificContainerCreationInput.java @@ -0,0 +1,24 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Provider specific input for container creation operation. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("ReplicationProviderSpecificContainerCreationInput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "A2A", value = A2AContainerCreationInput.class) +}) +public class ReplicationProviderSpecificContainerCreationInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProviderSpecificContainerMappingInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProviderSpecificContainerMappingInput.java new file mode 100644 index 0000000000000..4195a2a844dfd --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProviderSpecificContainerMappingInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Provider specific input for pairing operations. + */ +public class ReplicationProviderSpecificContainerMappingInput { + /** + * The class type. + */ + @JsonProperty(value = "instanceType") + private String instanceType; + + /** + * Get the class type. + * + * @return the instanceType value + */ + public String instanceType() { + return this.instanceType; + } + + /** + * Set the class type. + * + * @param instanceType the instanceType value to set + * @return the ReplicationProviderSpecificContainerMappingInput object itself. + */ + public ReplicationProviderSpecificContainerMappingInput withInstanceType(String instanceType) { + this.instanceType = instanceType; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProviderSpecificSettings.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProviderSpecificSettings.java new file mode 100644 index 0000000000000..9a9381a7d4093 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationProviderSpecificSettings.java @@ -0,0 +1,30 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Replication provider specific settings. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("ReplicationProviderSpecificSettings") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "HyperVReplicaBaseReplicationDetails", value = HyperVReplicaBaseReplicationDetails.class), + @JsonSubTypes.Type(name = "HyperVReplica2012", value = HyperVReplicaReplicationDetails.class), + @JsonSubTypes.Type(name = "HyperVReplica2012R2", value = HyperVReplicaBlueReplicationDetails.class), + @JsonSubTypes.Type(name = "HyperVReplicaAzure", value = HyperVReplicaAzureReplicationDetails.class), + @JsonSubTypes.Type(name = "InMageAzureV2", value = InMageAzureV2ReplicationDetails.class), + @JsonSubTypes.Type(name = "InMage", value = InMageReplicationDetails.class), + @JsonSubTypes.Type(name = "A2A", value = A2AReplicationDetails.class) +}) +public class ReplicationProviderSpecificSettings { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationRecoveryPlans.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationRecoveryPlans.java new file mode 100644 index 0000000000000..b3b11d8c131d5 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationRecoveryPlans.java @@ -0,0 +1,114 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationRecoveryPlansInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReplicationRecoveryPlans. + */ +public interface ReplicationRecoveryPlans extends SupportsCreating, HasInner { + /** + * Execute reprotect of the recovery plan. + * The operation to reprotect(reverse replicate) a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable reprotectAsync(String recoveryPlanName); + + /** + * Execute commit failover of the recovery plan. + * The operation to commit the fail over of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable failoverCommitAsync(String recoveryPlanName); + + /** + * Execute test failover cleanup of the recovery plan. + * The operation to cleanup test failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan test failover cleanup input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable testFailoverCleanupAsync(String recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties); + + /** + * Execute test failover of the recovery plan. + * The operation to start the test failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan test failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable testFailoverAsync(String recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties); + + /** + * Execute unplanned failover of the recovery plan. + * The operation to start the failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan unplanned failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable unplannedFailoverAsync(String recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties); + + /** + * Execute planned failover of the recovery plan. + * The operation to start the planned failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan planned failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable plannedFailoverAsync(String recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties); + + /** + * Gets the requested recovery plan. + * Gets the details of the recovery plan. + * + * @param recoveryPlanName Name of the recovery plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String recoveryPlanName); + + /** + * Gets the list of recovery plans. + * Lists the recovery plans in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Deletes the specified recovery plan. + * Delete a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String recoveryPlanName); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationRecoveryServicesProviders.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationRecoveryServicesProviders.java new file mode 100644 index 0000000000000..7e3603fd298c6 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationRecoveryServicesProviders.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationRecoveryServicesProvidersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReplicationRecoveryServicesProviders. + */ +public interface ReplicationRecoveryServicesProviders extends HasInner { + /** + * Refresh details from the recovery services provider. + * The operation to refresh the information from the recovery services provider. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable refreshProviderAsync(String fabricName, String providerName); + + /** + * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty we assume that it is old client and continue the old behavior). + * The operation to removes/delete(unregister) a recovery services provider from the vault. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String fabricName, String providerName); + + /** + * Gets the list of registered recovery services providers in the vault. This is a view only api. + * Lists the registered recovery services providers in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Gets the details of a recovery services provider. + * Gets the details of registered recovery services provider. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String fabricName, String providerName); + + /** + * Gets the list of registered recovery services providers for the fabric. + * Lists the registered recovery services providers for the specified fabric. + * + * @param fabricName Fabric name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByReplicationFabricsAsync(final String fabricName); + + /** + * Purges recovery service provider from fabric. + * The operation to purge(force delete) a recovery services provider from the vault. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable purgeAsync(String fabricName, String providerName); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationStorageClassificationMappings.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationStorageClassificationMappings.java new file mode 100644 index 0000000000000..548f08d881f47 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationStorageClassificationMappings.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationStorageClassificationMappingsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReplicationStorageClassificationMappings. + */ +public interface ReplicationStorageClassificationMappings extends SupportsCreating, HasInner { + /** + * Gets the list of storage classification mappings objects under a vault. + * Lists the storage classification mappings in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Gets the details of a storage classification mapping. + * Gets the details of the specified storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName); + + /** + * Gets the list of storage classification mappings objects under a storage. + * Lists the storage classification mappings for the fabric. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classfication name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByReplicationStorageClassificationsAsync(final String fabricName, final String storageClassificationName); + + /** + * Delete a storage classification mapping. + * The operation to delete a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationStorageClassifications.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationStorageClassifications.java new file mode 100644 index 0000000000000..7f3f277c4c5c6 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationStorageClassifications.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationStorageClassificationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReplicationStorageClassifications. + */ +public interface ReplicationStorageClassifications extends HasInner { + /** + * Gets the list of storage classification objects under a vault. + * Lists the storage classifications in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Gets the details of a storage classification. + * Gets the details of the specified storage classification. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String fabricName, String storageClassificationName); + + /** + * Gets the list of storage classification objects under a fabric. + * Lists the storage classifications available in the specified fabric. + * + * @param fabricName Site name of interest. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByReplicationFabricsAsync(final String fabricName); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationVaultHealths.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationVaultHealths.java new file mode 100644 index 0000000000000..b59204876226b --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationVaultHealths.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationVaultHealthsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReplicationVaultHealths. + */ +public interface ReplicationVaultHealths extends HasInner { + /** + * Gets the health summary for the vault. + * Gets the health details of the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationvCenters.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationvCenters.java new file mode 100644 index 0000000000000..fa69163ce2481 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReplicationvCenters.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.ReplicationvCentersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReplicationvCenters. + */ +public interface ReplicationvCenters extends SupportsCreating, HasInner { + /** + * Gets the list of vCenter registered under the vault. + * Lists the vCenter servers registered in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Gets the details of a vCenter. + * Gets the details of a registered vCenter server(Add vCenter server.). + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String fabricName, String vCenterName); + + /** + * Gets the list of vCenter registered under a fabric. + * Lists the vCenter servers registered in a fabric. + * + * @param fabricName Fabric name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByReplicationFabricsAsync(final String fabricName); + + /** + * Remove vCenter operation. + * The operation to remove(unregister) a registered vCenter server from the vault. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String fabricName, String vCenterName); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ResourceHealthSummary.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ResourceHealthSummary.java new file mode 100644 index 0000000000000..7f4b73b62556f --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ResourceHealthSummary.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Base class to define the health summary of the resources contained under an + * Arm resource. + */ +public class ResourceHealthSummary { + /** + * The count of total resources umder the container. + */ + @JsonProperty(value = "resourceCount") + private Integer resourceCount; + + /** + * The list of summary of health errors across the resources under the + * container. + */ + @JsonProperty(value = "issues") + private List issues; + + /** + * Get the count of total resources umder the container. + * + * @return the resourceCount value + */ + public Integer resourceCount() { + return this.resourceCount; + } + + /** + * Set the count of total resources umder the container. + * + * @param resourceCount the resourceCount value to set + * @return the ResourceHealthSummary object itself. + */ + public ResourceHealthSummary withResourceCount(Integer resourceCount) { + this.resourceCount = resourceCount; + return this; + } + + /** + * Get the list of summary of health errors across the resources under the container. + * + * @return the issues value + */ + public List issues() { + return this.issues; + } + + /** + * Set the list of summary of health errors across the resources under the container. + * + * @param issues the issues value to set + * @return the ResourceHealthSummary object itself. + */ + public ResourceHealthSummary withIssues(List issues) { + this.issues = issues; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ResumeJobParams.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ResumeJobParams.java new file mode 100644 index 0000000000000..e03c3b3000c1b --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ResumeJobParams.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Resume job params. + */ +public class ResumeJobParams { + /** + * Resume job properties. + */ + @JsonProperty(value = "properties") + private ResumeJobParamsProperties properties; + + /** + * Get resume job properties. + * + * @return the properties value + */ + public ResumeJobParamsProperties properties() { + return this.properties; + } + + /** + * Set resume job properties. + * + * @param properties the properties value to set + * @return the ResumeJobParams object itself. + */ + public ResumeJobParams withProperties(ResumeJobParamsProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ResumeJobParamsProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ResumeJobParamsProperties.java new file mode 100644 index 0000000000000..e6079ef325cf6 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ResumeJobParamsProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Resume job properties. + */ +public class ResumeJobParamsProperties { + /** + * Resume job comments. + */ + @JsonProperty(value = "comments") + private String comments; + + /** + * Get resume job comments. + * + * @return the comments value + */ + public String comments() { + return this.comments; + } + + /** + * Set resume job comments. + * + * @param comments the comments value to set + * @return the ResumeJobParamsProperties object itself. + */ + public ResumeJobParamsProperties withComments(String comments) { + this.comments = comments; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RetentionVolume.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RetentionVolume.java new file mode 100644 index 0000000000000..a0a5a05d1cf01 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RetentionVolume.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The retention details of the MT. + */ +public class RetentionVolume { + /** + * The volume name. + */ + @JsonProperty(value = "volumeName") + private String volumeName; + + /** + * The volume capacity. + */ + @JsonProperty(value = "capacityInBytes") + private Long capacityInBytes; + + /** + * The free space available in this volume. + */ + @JsonProperty(value = "freeSpaceInBytes") + private Long freeSpaceInBytes; + + /** + * The threshold percentage. + */ + @JsonProperty(value = "thresholdPercentage") + private Integer thresholdPercentage; + + /** + * Get the volume name. + * + * @return the volumeName value + */ + public String volumeName() { + return this.volumeName; + } + + /** + * Set the volume name. + * + * @param volumeName the volumeName value to set + * @return the RetentionVolume object itself. + */ + public RetentionVolume withVolumeName(String volumeName) { + this.volumeName = volumeName; + return this; + } + + /** + * Get the volume capacity. + * + * @return the capacityInBytes value + */ + public Long capacityInBytes() { + return this.capacityInBytes; + } + + /** + * Set the volume capacity. + * + * @param capacityInBytes the capacityInBytes value to set + * @return the RetentionVolume object itself. + */ + public RetentionVolume withCapacityInBytes(Long capacityInBytes) { + this.capacityInBytes = capacityInBytes; + return this; + } + + /** + * Get the free space available in this volume. + * + * @return the freeSpaceInBytes value + */ + public Long freeSpaceInBytes() { + return this.freeSpaceInBytes; + } + + /** + * Set the free space available in this volume. + * + * @param freeSpaceInBytes the freeSpaceInBytes value to set + * @return the RetentionVolume object itself. + */ + public RetentionVolume withFreeSpaceInBytes(Long freeSpaceInBytes) { + this.freeSpaceInBytes = freeSpaceInBytes; + return this; + } + + /** + * Get the threshold percentage. + * + * @return the thresholdPercentage value + */ + public Integer thresholdPercentage() { + return this.thresholdPercentage; + } + + /** + * Set the threshold percentage. + * + * @param thresholdPercentage the thresholdPercentage value to set + * @return the RetentionVolume object itself. + */ + public RetentionVolume withThresholdPercentage(Integer thresholdPercentage) { + this.thresholdPercentage = thresholdPercentage; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReverseReplicationInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReverseReplicationInput.java new file mode 100644 index 0000000000000..0f6e112bd6efb --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReverseReplicationInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Reverse replication input. + */ +public class ReverseReplicationInput { + /** + * Reverse replication properties. + */ + @JsonProperty(value = "properties") + private ReverseReplicationInputProperties properties; + + /** + * Get reverse replication properties. + * + * @return the properties value + */ + public ReverseReplicationInputProperties properties() { + return this.properties; + } + + /** + * Set reverse replication properties. + * + * @param properties the properties value to set + * @return the ReverseReplicationInput object itself. + */ + public ReverseReplicationInput withProperties(ReverseReplicationInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReverseReplicationInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReverseReplicationInputProperties.java new file mode 100644 index 0000000000000..723d183e77c99 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReverseReplicationInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Reverse replication input properties. + */ +public class ReverseReplicationInputProperties { + /** + * Failover direction. + */ + @JsonProperty(value = "failoverDirection") + private String failoverDirection; + + /** + * Provider specific reverse replication input. + */ + @JsonProperty(value = "providerSpecificDetails") + private ReverseReplicationProviderSpecificInput providerSpecificDetails; + + /** + * Get failover direction. + * + * @return the failoverDirection value + */ + public String failoverDirection() { + return this.failoverDirection; + } + + /** + * Set failover direction. + * + * @param failoverDirection the failoverDirection value to set + * @return the ReverseReplicationInputProperties object itself. + */ + public ReverseReplicationInputProperties withFailoverDirection(String failoverDirection) { + this.failoverDirection = failoverDirection; + return this; + } + + /** + * Get provider specific reverse replication input. + * + * @return the providerSpecificDetails value + */ + public ReverseReplicationProviderSpecificInput providerSpecificDetails() { + return this.providerSpecificDetails; + } + + /** + * Set provider specific reverse replication input. + * + * @param providerSpecificDetails the providerSpecificDetails value to set + * @return the ReverseReplicationInputProperties object itself. + */ + public ReverseReplicationInputProperties withProviderSpecificDetails(ReverseReplicationProviderSpecificInput providerSpecificDetails) { + this.providerSpecificDetails = providerSpecificDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReverseReplicationProviderSpecificInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReverseReplicationProviderSpecificInput.java new file mode 100644 index 0000000000000..4308e7f827d16 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ReverseReplicationProviderSpecificInput.java @@ -0,0 +1,27 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Provider specific reverse replication input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("ReverseReplicationProviderSpecificInput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "HyperVReplicaAzure", value = HyperVReplicaAzureReprotectInput.class), + @JsonSubTypes.Type(name = "InMageAzureV2", value = InMageAzureV2ReprotectInput.class), + @JsonSubTypes.Type(name = "InMage", value = InMageReprotectInput.class), + @JsonSubTypes.Type(name = "A2A", value = A2AReprotectInput.class) +}) +public class ReverseReplicationProviderSpecificInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RoleAssignment.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RoleAssignment.java new file mode 100644 index 0000000000000..623219d68b0ad --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RoleAssignment.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure role assignment details. + */ +public class RoleAssignment { + /** + * The ARM Id of the role assignment. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The name of the role assignment. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Role assignment scope. + */ + @JsonProperty(value = "scope") + private String scope; + + /** + * Principal Id. + */ + @JsonProperty(value = "principalId") + private String principalId; + + /** + * Role definition id. + */ + @JsonProperty(value = "roleDefinitionId") + private String roleDefinitionId; + + /** + * Get the ARM Id of the role assignment. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the ARM Id of the role assignment. + * + * @param id the id value to set + * @return the RoleAssignment object itself. + */ + public RoleAssignment withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name of the role assignment. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the role assignment. + * + * @param name the name value to set + * @return the RoleAssignment object itself. + */ + public RoleAssignment withName(String name) { + this.name = name; + return this; + } + + /** + * Get role assignment scope. + * + * @return the scope value + */ + public String scope() { + return this.scope; + } + + /** + * Set role assignment scope. + * + * @param scope the scope value to set + * @return the RoleAssignment object itself. + */ + public RoleAssignment withScope(String scope) { + this.scope = scope; + return this; + } + + /** + * Get principal Id. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Set principal Id. + * + * @param principalId the principalId value to set + * @return the RoleAssignment object itself. + */ + public RoleAssignment withPrincipalId(String principalId) { + this.principalId = principalId; + return this; + } + + /** + * Get role definition id. + * + * @return the roleDefinitionId value + */ + public String roleDefinitionId() { + return this.roleDefinitionId; + } + + /** + * Set role definition id. + * + * @param roleDefinitionId the roleDefinitionId value to set + * @return the RoleAssignment object itself. + */ + public RoleAssignment withRoleDefinitionId(String roleDefinitionId) { + this.roleDefinitionId = roleDefinitionId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RpInMageRecoveryPointType.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RpInMageRecoveryPointType.java new file mode 100644 index 0000000000000..83313ef7eea78 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RpInMageRecoveryPointType.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for RpInMageRecoveryPointType. + */ +public enum RpInMageRecoveryPointType { + /** Enum value LatestTime. */ + LATEST_TIME("LatestTime"), + + /** Enum value LatestTag. */ + LATEST_TAG("LatestTag"), + + /** Enum value Custom. */ + CUSTOM("Custom"); + + /** The actual serialized value for a RpInMageRecoveryPointType instance. */ + private String value; + + RpInMageRecoveryPointType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a RpInMageRecoveryPointType instance. + * + * @param value the serialized value to parse. + * @return the parsed RpInMageRecoveryPointType object, or null if unable to parse. + */ + @JsonCreator + public static RpInMageRecoveryPointType fromString(String value) { + RpInMageRecoveryPointType[] items = RpInMageRecoveryPointType.values(); + for (RpInMageRecoveryPointType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RunAsAccount.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RunAsAccount.java new file mode 100644 index 0000000000000..9aeece4f6dd12 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/RunAsAccount.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * CS Accounts Details. + */ +public class RunAsAccount { + /** + * The CS RunAs account Id. + */ + @JsonProperty(value = "accountId") + private String accountId; + + /** + * The CS RunAs account name. + */ + @JsonProperty(value = "accountName") + private String accountName; + + /** + * Get the CS RunAs account Id. + * + * @return the accountId value + */ + public String accountId() { + return this.accountId; + } + + /** + * Set the CS RunAs account Id. + * + * @param accountId the accountId value to set + * @return the RunAsAccount object itself. + */ + public RunAsAccount withAccountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get the CS RunAs account name. + * + * @return the accountName value + */ + public String accountName() { + return this.accountName; + } + + /** + * Set the CS RunAs account name. + * + * @param accountName the accountName value to set + * @return the RunAsAccount object itself. + */ + public RunAsAccount withAccountName(String accountName) { + this.accountName = accountName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SanEnableProtectionInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SanEnableProtectionInput.java new file mode 100644 index 0000000000000..4b2d6517dc427 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SanEnableProtectionInput.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * San enable protection provider specific input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("San") +public class SanEnableProtectionInput extends EnableProtectionProviderSpecificInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ScriptActionTaskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ScriptActionTaskDetails.java new file mode 100644 index 0000000000000..82a3bbcf9ed91 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ScriptActionTaskDetails.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * This class represents the script action task details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("ScriptActionTaskDetails") +public class ScriptActionTaskDetails extends TaskTypeDetails { + /** + * The name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The path. + */ + @JsonProperty(value = "path") + private String path; + + /** + * The output. + */ + @JsonProperty(value = "output") + private String output; + + /** + * A value indicating whether it is a primary side script or not. + */ + @JsonProperty(value = "isPrimarySideScript") + private Boolean isPrimarySideScript; + + /** + * Get the name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name. + * + * @param name the name value to set + * @return the ScriptActionTaskDetails object itself. + */ + public ScriptActionTaskDetails withName(String name) { + this.name = name; + return this; + } + + /** + * Get the path. + * + * @return the path value + */ + public String path() { + return this.path; + } + + /** + * Set the path. + * + * @param path the path value to set + * @return the ScriptActionTaskDetails object itself. + */ + public ScriptActionTaskDetails withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the output. + * + * @return the output value + */ + public String output() { + return this.output; + } + + /** + * Set the output. + * + * @param output the output value to set + * @return the ScriptActionTaskDetails object itself. + */ + public ScriptActionTaskDetails withOutput(String output) { + this.output = output; + return this; + } + + /** + * Get a value indicating whether it is a primary side script or not. + * + * @return the isPrimarySideScript value + */ + public Boolean isPrimarySideScript() { + return this.isPrimarySideScript; + } + + /** + * Set a value indicating whether it is a primary side script or not. + * + * @param isPrimarySideScript the isPrimarySideScript value to set + * @return the ScriptActionTaskDetails object itself. + */ + public ScriptActionTaskDetails withIsPrimarySideScript(Boolean isPrimarySideScript) { + this.isPrimarySideScript = isPrimarySideScript; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ServiceError.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ServiceError.java new file mode 100644 index 0000000000000..d9bcdc53a120c --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/ServiceError.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * ASR error model. + */ +public class ServiceError { + /** + * Error code. + */ + @JsonProperty(value = "code") + private String code; + + /** + * Error message. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Possible causes of error. + */ + @JsonProperty(value = "possibleCauses") + private String possibleCauses; + + /** + * Recommended action to resolve error. + */ + @JsonProperty(value = "recommendedAction") + private String recommendedAction; + + /** + * Activity Id. + */ + @JsonProperty(value = "activityId") + private String activityId; + + /** + * Get error code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set error code. + * + * @param code the code value to set + * @return the ServiceError object itself. + */ + public ServiceError withCode(String code) { + this.code = code; + return this; + } + + /** + * Get error message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set error message. + * + * @param message the message value to set + * @return the ServiceError object itself. + */ + public ServiceError withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get possible causes of error. + * + * @return the possibleCauses value + */ + public String possibleCauses() { + return this.possibleCauses; + } + + /** + * Set possible causes of error. + * + * @param possibleCauses the possibleCauses value to set + * @return the ServiceError object itself. + */ + public ServiceError withPossibleCauses(String possibleCauses) { + this.possibleCauses = possibleCauses; + return this; + } + + /** + * Get recommended action to resolve error. + * + * @return the recommendedAction value + */ + public String recommendedAction() { + return this.recommendedAction; + } + + /** + * Set recommended action to resolve error. + * + * @param recommendedAction the recommendedAction value to set + * @return the ServiceError object itself. + */ + public ServiceError withRecommendedAction(String recommendedAction) { + this.recommendedAction = recommendedAction; + return this; + } + + /** + * Get activity Id. + * + * @return the activityId value + */ + public String activityId() { + return this.activityId; + } + + /** + * Set activity Id. + * + * @param activityId the activityId value to set + * @return the ServiceError object itself. + */ + public ServiceError withActivityId(String activityId) { + this.activityId = activityId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SetMultiVmSyncStatus.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SetMultiVmSyncStatus.java new file mode 100644 index 0000000000000..faf8dd5b56081 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SetMultiVmSyncStatus.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for SetMultiVmSyncStatus. + */ +public enum SetMultiVmSyncStatus { + /** Enum value Enable. */ + ENABLE("Enable"), + + /** Enum value Disable. */ + DISABLE("Disable"); + + /** The actual serialized value for a SetMultiVmSyncStatus instance. */ + private String value; + + SetMultiVmSyncStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SetMultiVmSyncStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed SetMultiVmSyncStatus object, or null if unable to parse. + */ + @JsonCreator + public static SetMultiVmSyncStatus fromString(String value) { + SetMultiVmSyncStatus[] items = SetMultiVmSyncStatus.values(); + for (SetMultiVmSyncStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Severity.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Severity.java new file mode 100644 index 0000000000000..6969660aa5e32 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Severity.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for Severity. + */ +public enum Severity { + /** Enum value NONE. */ + NONE("NONE"), + + /** Enum value Warning. */ + WARNING("Warning"), + + /** Enum value Error. */ + ERROR("Error"), + + /** Enum value Info. */ + INFO("Info"); + + /** The actual serialized value for a Severity instance. */ + private String value; + + Severity(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a Severity instance. + * + * @param value the serialized value to parse. + * @return the parsed Severity object, or null if unable to parse. + */ + @JsonCreator + public static Severity fromString(String value) { + Severity[] items = Severity.values(); + for (Severity item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SourceSiteOperations.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SourceSiteOperations.java new file mode 100644 index 0000000000000..555c74f609f18 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SourceSiteOperations.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for SourceSiteOperations. + */ +public enum SourceSiteOperations { + /** Enum value Required. */ + REQUIRED("Required"), + + /** Enum value NotRequired. */ + NOT_REQUIRED("NotRequired"); + + /** The actual serialized value for a SourceSiteOperations instance. */ + private String value; + + SourceSiteOperations(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SourceSiteOperations instance. + * + * @param value the serialized value to parse. + * @return the parsed SourceSiteOperations object, or null if unable to parse. + */ + @JsonCreator + public static SourceSiteOperations fromString(String value) { + SourceSiteOperations[] items = SourceSiteOperations.values(); + for (SourceSiteOperations item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassification.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassification.java new file mode 100644 index 0000000000000..ef5c9624bf47a --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassification.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.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.StorageClassificationInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; + +/** + * Type representing StorageClassification. + */ +public interface StorageClassification extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + StorageClassificationProperties properties(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassificationMapping.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassificationMapping.java new file mode 100644 index 0000000000000..900fdf71ab905 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassificationMapping.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.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.StorageClassificationMappingInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; + +/** + * Type representing StorageClassificationMapping. + */ +public interface StorageClassificationMapping extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + StorageClassificationMappingProperties properties(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the StorageClassificationMapping definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithReplicationStorageClassification, DefinitionStages.WithCreate { + } + + /** + * Grouping of StorageClassificationMapping definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a StorageClassificationMapping definition. + */ + interface Blank extends WithReplicationStorageClassification { + } + + /** + * The stage of the storageclassificationmapping definition allowing to specify ReplicationStorageClassification. + */ + interface WithReplicationStorageClassification { + /** + * Specifies fabricName, storageClassificationName. + */ + WithCreate withExistingReplicationStorageClassification(String fabricName, String storageClassificationName); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a StorageClassificationMapping update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable { + } + + /** + * Grouping of StorageClassificationMapping update stages. + */ + interface UpdateStages { + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassificationMappingInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassificationMappingInput.java new file mode 100644 index 0000000000000..9eefa1fb58fba --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassificationMappingInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Storage mapping input. + */ +public class StorageClassificationMappingInput { + /** + * Storage mapping input properties. + */ + @JsonProperty(value = "properties") + private StorageMappingInputProperties properties; + + /** + * Get storage mapping input properties. + * + * @return the properties value + */ + public StorageMappingInputProperties properties() { + return this.properties; + } + + /** + * Set storage mapping input properties. + * + * @param properties the properties value to set + * @return the StorageClassificationMappingInput object itself. + */ + public StorageClassificationMappingInput withProperties(StorageMappingInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassificationMappingProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassificationMappingProperties.java new file mode 100644 index 0000000000000..85fc58badce4f --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassificationMappingProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Storage mapping properties. + */ +public class StorageClassificationMappingProperties { + /** + * Target storage object Id. + */ + @JsonProperty(value = "targetStorageClassificationId") + private String targetStorageClassificationId; + + /** + * Get target storage object Id. + * + * @return the targetStorageClassificationId value + */ + public String targetStorageClassificationId() { + return this.targetStorageClassificationId; + } + + /** + * Set target storage object Id. + * + * @param targetStorageClassificationId the targetStorageClassificationId value to set + * @return the StorageClassificationMappingProperties object itself. + */ + public StorageClassificationMappingProperties withTargetStorageClassificationId(String targetStorageClassificationId) { + this.targetStorageClassificationId = targetStorageClassificationId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassificationProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassificationProperties.java new file mode 100644 index 0000000000000..bf0a4479b946c --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageClassificationProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Storage object properties. + */ +public class StorageClassificationProperties { + /** + * Friendly name of the Storage classification. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * Get friendly name of the Storage classification. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set friendly name of the Storage classification. + * + * @param friendlyName the friendlyName value to set + * @return the StorageClassificationProperties object itself. + */ + public StorageClassificationProperties withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageMappingInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageMappingInputProperties.java new file mode 100644 index 0000000000000..f893cc3c13a1c --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/StorageMappingInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Storage mapping input properties. + */ +public class StorageMappingInputProperties { + /** + * The ID of the storage object. + */ + @JsonProperty(value = "targetStorageClassificationId") + private String targetStorageClassificationId; + + /** + * Get the ID of the storage object. + * + * @return the targetStorageClassificationId value + */ + public String targetStorageClassificationId() { + return this.targetStorageClassificationId; + } + + /** + * Set the ID of the storage object. + * + * @param targetStorageClassificationId the targetStorageClassificationId value to set + * @return the StorageMappingInputProperties object itself. + */ + public StorageMappingInputProperties withTargetStorageClassificationId(String targetStorageClassificationId) { + this.targetStorageClassificationId = targetStorageClassificationId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Subnet.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Subnet.java new file mode 100644 index 0000000000000..642bb6830a69e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/Subnet.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Subnets of the network. + */ +public class Subnet { + /** + * The subnet name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The subnet friendly name. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * The list of addresses for the subnet. + */ + @JsonProperty(value = "addressList") + private List addressList; + + /** + * Get the subnet name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the subnet name. + * + * @param name the name value to set + * @return the Subnet object itself. + */ + public Subnet withName(String name) { + this.name = name; + return this; + } + + /** + * Get the subnet friendly name. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the subnet friendly name. + * + * @param friendlyName the friendlyName value to set + * @return the Subnet object itself. + */ + public Subnet withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the list of addresses for the subnet. + * + * @return the addressList value + */ + public List addressList() { + return this.addressList; + } + + /** + * Set the list of addresses for the subnet. + * + * @param addressList the addressList value to set + * @return the Subnet object itself. + */ + public Subnet withAddressList(List addressList) { + this.addressList = addressList; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SwitchProtectionInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SwitchProtectionInput.java new file mode 100644 index 0000000000000..ef0a8d7aa7b5f --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SwitchProtectionInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Switch protection input. + */ +public class SwitchProtectionInput { + /** + * Switch protection properties. + */ + @JsonProperty(value = "properties") + private SwitchProtectionInputProperties properties; + + /** + * Get switch protection properties. + * + * @return the properties value + */ + public SwitchProtectionInputProperties properties() { + return this.properties; + } + + /** + * Set switch protection properties. + * + * @param properties the properties value to set + * @return the SwitchProtectionInput object itself. + */ + public SwitchProtectionInput withProperties(SwitchProtectionInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SwitchProtectionInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SwitchProtectionInputProperties.java new file mode 100644 index 0000000000000..586e0330d54ac --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SwitchProtectionInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Switch protection input properties. + */ +public class SwitchProtectionInputProperties { + /** + * The unique replication protected item name. + */ + @JsonProperty(value = "replicationProtectedItemName") + private String replicationProtectedItemName; + + /** + * Provider specific switch protection input. + */ + @JsonProperty(value = "providerSpecificDetails") + private SwitchProtectionProviderSpecificInput providerSpecificDetails; + + /** + * Get the unique replication protected item name. + * + * @return the replicationProtectedItemName value + */ + public String replicationProtectedItemName() { + return this.replicationProtectedItemName; + } + + /** + * Set the unique replication protected item name. + * + * @param replicationProtectedItemName the replicationProtectedItemName value to set + * @return the SwitchProtectionInputProperties object itself. + */ + public SwitchProtectionInputProperties withReplicationProtectedItemName(String replicationProtectedItemName) { + this.replicationProtectedItemName = replicationProtectedItemName; + return this; + } + + /** + * Get provider specific switch protection input. + * + * @return the providerSpecificDetails value + */ + public SwitchProtectionProviderSpecificInput providerSpecificDetails() { + return this.providerSpecificDetails; + } + + /** + * Set provider specific switch protection input. + * + * @param providerSpecificDetails the providerSpecificDetails value to set + * @return the SwitchProtectionInputProperties object itself. + */ + public SwitchProtectionInputProperties withProviderSpecificDetails(SwitchProtectionProviderSpecificInput providerSpecificDetails) { + this.providerSpecificDetails = providerSpecificDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SwitchProtectionJobDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SwitchProtectionJobDetails.java new file mode 100644 index 0000000000000..4ba129f74e084 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SwitchProtectionJobDetails.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * This class represents details for switch protection job. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("SwitchProtectionJobDetails") +public class SwitchProtectionJobDetails extends JobDetails { + /** + * ARM Id of the new replication protected item. + */ + @JsonProperty(value = "newReplicationProtectedItemId") + private String newReplicationProtectedItemId; + + /** + * Get aRM Id of the new replication protected item. + * + * @return the newReplicationProtectedItemId value + */ + public String newReplicationProtectedItemId() { + return this.newReplicationProtectedItemId; + } + + /** + * Set aRM Id of the new replication protected item. + * + * @param newReplicationProtectedItemId the newReplicationProtectedItemId value to set + * @return the SwitchProtectionJobDetails object itself. + */ + public SwitchProtectionJobDetails withNewReplicationProtectedItemId(String newReplicationProtectedItemId) { + this.newReplicationProtectedItemId = newReplicationProtectedItemId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SwitchProtectionProviderSpecificInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SwitchProtectionProviderSpecificInput.java new file mode 100644 index 0000000000000..8e1df9d5f05a2 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/SwitchProtectionProviderSpecificInput.java @@ -0,0 +1,24 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Provider specific switch protection input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("SwitchProtectionProviderSpecificInput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "A2A", value = A2ASwitchProtectionInput.class) +}) +public class SwitchProtectionProviderSpecificInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TaskTypeDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TaskTypeDetails.java new file mode 100644 index 0000000000000..69bbcba9cb910 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TaskTypeDetails.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Task details based on specific task type. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("TaskTypeDetails") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "JobTaskDetails", value = JobTaskDetails.class), + @JsonSubTypes.Type(name = "VirtualMachineTaskDetails", value = VirtualMachineTaskDetails.class), + @JsonSubTypes.Type(name = "FabricReplicationGroupTaskDetails", value = FabricReplicationGroupTaskDetails.class), + @JsonSubTypes.Type(name = "ManualActionTaskDetails", value = ManualActionTaskDetails.class), + @JsonSubTypes.Type(name = "ScriptActionTaskDetails", value = ScriptActionTaskDetails.class), + @JsonSubTypes.Type(name = "VmNicUpdatesTaskDetails", value = VmNicUpdatesTaskDetails.class), + @JsonSubTypes.Type(name = "ConsistencyCheckTaskDetails", value = ConsistencyCheckTaskDetails.class), + @JsonSubTypes.Type(name = "AutomationRunbookTaskDetails", value = AutomationRunbookTaskDetails.class) +}) +public class TaskTypeDetails { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverCleanupInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverCleanupInput.java new file mode 100644 index 0000000000000..96832aa906a93 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverCleanupInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input definition for test failover cleanup. + */ +public class TestFailoverCleanupInput { + /** + * Test failover cleanup input properties. + */ + @JsonProperty(value = "properties", required = true) + private TestFailoverCleanupInputProperties properties; + + /** + * Get test failover cleanup input properties. + * + * @return the properties value + */ + public TestFailoverCleanupInputProperties properties() { + return this.properties; + } + + /** + * Set test failover cleanup input properties. + * + * @param properties the properties value to set + * @return the TestFailoverCleanupInput object itself. + */ + public TestFailoverCleanupInput withProperties(TestFailoverCleanupInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverCleanupInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverCleanupInputProperties.java new file mode 100644 index 0000000000000..3189ad07fb8b7 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverCleanupInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input definition for test failover cleanup input properties. + */ +public class TestFailoverCleanupInputProperties { + /** + * Test failover cleanup comments. + */ + @JsonProperty(value = "comments") + private String comments; + + /** + * Get test failover cleanup comments. + * + * @return the comments value + */ + public String comments() { + return this.comments; + } + + /** + * Set test failover cleanup comments. + * + * @param comments the comments value to set + * @return the TestFailoverCleanupInputProperties object itself. + */ + public TestFailoverCleanupInputProperties withComments(String comments) { + this.comments = comments; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverInput.java new file mode 100644 index 0000000000000..f5531a1b14823 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input definition for planned failover. + */ +public class TestFailoverInput { + /** + * Planned failover input properties. + */ + @JsonProperty(value = "properties") + private TestFailoverInputProperties properties; + + /** + * Get planned failover input properties. + * + * @return the properties value + */ + public TestFailoverInputProperties properties() { + return this.properties; + } + + /** + * Set planned failover input properties. + * + * @param properties the properties value to set + * @return the TestFailoverInput object itself. + */ + public TestFailoverInput withProperties(TestFailoverInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverInputProperties.java new file mode 100644 index 0000000000000..e404df2d67aaf --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input definition for planned failover input properties. + */ +public class TestFailoverInputProperties { + /** + * Failover direction. + */ + @JsonProperty(value = "failoverDirection") + private String failoverDirection; + + /** + * Network type to be used for test failover. + */ + @JsonProperty(value = "networkType") + private String networkType; + + /** + * The id of the network to be used for test failover. + */ + @JsonProperty(value = "networkId") + private String networkId; + + /** + * A value indicating whether the test failover cleanup is to be skipped. + */ + @JsonProperty(value = "skipTestFailoverCleanup") + private String skipTestFailoverCleanup; + + /** + * Provider specific settings. + */ + @JsonProperty(value = "providerSpecificDetails") + private ProviderSpecificFailoverInput providerSpecificDetails; + + /** + * Get failover direction. + * + * @return the failoverDirection value + */ + public String failoverDirection() { + return this.failoverDirection; + } + + /** + * Set failover direction. + * + * @param failoverDirection the failoverDirection value to set + * @return the TestFailoverInputProperties object itself. + */ + public TestFailoverInputProperties withFailoverDirection(String failoverDirection) { + this.failoverDirection = failoverDirection; + return this; + } + + /** + * Get network type to be used for test failover. + * + * @return the networkType value + */ + public String networkType() { + return this.networkType; + } + + /** + * Set network type to be used for test failover. + * + * @param networkType the networkType value to set + * @return the TestFailoverInputProperties object itself. + */ + public TestFailoverInputProperties withNetworkType(String networkType) { + this.networkType = networkType; + return this; + } + + /** + * Get the id of the network to be used for test failover. + * + * @return the networkId value + */ + public String networkId() { + return this.networkId; + } + + /** + * Set the id of the network to be used for test failover. + * + * @param networkId the networkId value to set + * @return the TestFailoverInputProperties object itself. + */ + public TestFailoverInputProperties withNetworkId(String networkId) { + this.networkId = networkId; + return this; + } + + /** + * Get a value indicating whether the test failover cleanup is to be skipped. + * + * @return the skipTestFailoverCleanup value + */ + public String skipTestFailoverCleanup() { + return this.skipTestFailoverCleanup; + } + + /** + * Set a value indicating whether the test failover cleanup is to be skipped. + * + * @param skipTestFailoverCleanup the skipTestFailoverCleanup value to set + * @return the TestFailoverInputProperties object itself. + */ + public TestFailoverInputProperties withSkipTestFailoverCleanup(String skipTestFailoverCleanup) { + this.skipTestFailoverCleanup = skipTestFailoverCleanup; + return this; + } + + /** + * Get provider specific settings. + * + * @return the providerSpecificDetails value + */ + public ProviderSpecificFailoverInput providerSpecificDetails() { + return this.providerSpecificDetails; + } + + /** + * Set provider specific settings. + * + * @param providerSpecificDetails the providerSpecificDetails value to set + * @return the TestFailoverInputProperties object itself. + */ + public TestFailoverInputProperties withProviderSpecificDetails(ProviderSpecificFailoverInput providerSpecificDetails) { + this.providerSpecificDetails = providerSpecificDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverJobDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverJobDetails.java new file mode 100644 index 0000000000000..9c1c8d15d9d77 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/TestFailoverJobDetails.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * This class represents the details for a test failover job. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("TestFailoverJobDetails") +public class TestFailoverJobDetails extends JobDetails { + /** + * The test failover status. + */ + @JsonProperty(value = "testFailoverStatus") + private String testFailoverStatus; + + /** + * The test failover comments. + */ + @JsonProperty(value = "comments") + private String comments; + + /** + * The test network name. + */ + @JsonProperty(value = "networkName") + private String networkName; + + /** + * The test network friendly name. + */ + @JsonProperty(value = "networkFriendlyName") + private String networkFriendlyName; + + /** + * The test network type (see TestFailoverInput enum for possible values). + */ + @JsonProperty(value = "networkType") + private String networkType; + + /** + * The test VM details. + */ + @JsonProperty(value = "protectedItemDetails") + private List protectedItemDetails; + + /** + * Get the test failover status. + * + * @return the testFailoverStatus value + */ + public String testFailoverStatus() { + return this.testFailoverStatus; + } + + /** + * Set the test failover status. + * + * @param testFailoverStatus the testFailoverStatus value to set + * @return the TestFailoverJobDetails object itself. + */ + public TestFailoverJobDetails withTestFailoverStatus(String testFailoverStatus) { + this.testFailoverStatus = testFailoverStatus; + return this; + } + + /** + * Get the test failover comments. + * + * @return the comments value + */ + public String comments() { + return this.comments; + } + + /** + * Set the test failover comments. + * + * @param comments the comments value to set + * @return the TestFailoverJobDetails object itself. + */ + public TestFailoverJobDetails withComments(String comments) { + this.comments = comments; + return this; + } + + /** + * Get the test network name. + * + * @return the networkName value + */ + public String networkName() { + return this.networkName; + } + + /** + * Set the test network name. + * + * @param networkName the networkName value to set + * @return the TestFailoverJobDetails object itself. + */ + public TestFailoverJobDetails withNetworkName(String networkName) { + this.networkName = networkName; + return this; + } + + /** + * Get the test network friendly name. + * + * @return the networkFriendlyName value + */ + public String networkFriendlyName() { + return this.networkFriendlyName; + } + + /** + * Set the test network friendly name. + * + * @param networkFriendlyName the networkFriendlyName value to set + * @return the TestFailoverJobDetails object itself. + */ + public TestFailoverJobDetails withNetworkFriendlyName(String networkFriendlyName) { + this.networkFriendlyName = networkFriendlyName; + return this; + } + + /** + * Get the test network type (see TestFailoverInput enum for possible values). + * + * @return the networkType value + */ + public String networkType() { + return this.networkType; + } + + /** + * Set the test network type (see TestFailoverInput enum for possible values). + * + * @param networkType the networkType value to set + * @return the TestFailoverJobDetails object itself. + */ + public TestFailoverJobDetails withNetworkType(String networkType) { + this.networkType = networkType; + return this; + } + + /** + * Get the test VM details. + * + * @return the protectedItemDetails value + */ + public List protectedItemDetails() { + return this.protectedItemDetails; + } + + /** + * Set the test VM details. + * + * @param protectedItemDetails the protectedItemDetails value to set + * @return the TestFailoverJobDetails object itself. + */ + public TestFailoverJobDetails withProtectedItemDetails(List protectedItemDetails) { + this.protectedItemDetails = protectedItemDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UnplannedFailoverInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UnplannedFailoverInput.java new file mode 100644 index 0000000000000..6019c23c8da52 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UnplannedFailoverInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input definition for planned failover. + */ +public class UnplannedFailoverInput { + /** + * Planned failover input properties. + */ + @JsonProperty(value = "properties") + private UnplannedFailoverInputProperties properties; + + /** + * Get planned failover input properties. + * + * @return the properties value + */ + public UnplannedFailoverInputProperties properties() { + return this.properties; + } + + /** + * Set planned failover input properties. + * + * @param properties the properties value to set + * @return the UnplannedFailoverInput object itself. + */ + public UnplannedFailoverInput withProperties(UnplannedFailoverInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UnplannedFailoverInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UnplannedFailoverInputProperties.java new file mode 100644 index 0000000000000..11fd7585a87f9 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UnplannedFailoverInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input definition for planned failover input properties. + */ +public class UnplannedFailoverInputProperties { + /** + * Failover direction. + */ + @JsonProperty(value = "failoverDirection") + private String failoverDirection; + + /** + * Source site operations status. + */ + @JsonProperty(value = "sourceSiteOperations") + private String sourceSiteOperations; + + /** + * Provider specific settings. + */ + @JsonProperty(value = "providerSpecificDetails") + private ProviderSpecificFailoverInput providerSpecificDetails; + + /** + * Get failover direction. + * + * @return the failoverDirection value + */ + public String failoverDirection() { + return this.failoverDirection; + } + + /** + * Set failover direction. + * + * @param failoverDirection the failoverDirection value to set + * @return the UnplannedFailoverInputProperties object itself. + */ + public UnplannedFailoverInputProperties withFailoverDirection(String failoverDirection) { + this.failoverDirection = failoverDirection; + return this; + } + + /** + * Get source site operations status. + * + * @return the sourceSiteOperations value + */ + public String sourceSiteOperations() { + return this.sourceSiteOperations; + } + + /** + * Set source site operations status. + * + * @param sourceSiteOperations the sourceSiteOperations value to set + * @return the UnplannedFailoverInputProperties object itself. + */ + public UnplannedFailoverInputProperties withSourceSiteOperations(String sourceSiteOperations) { + this.sourceSiteOperations = sourceSiteOperations; + return this; + } + + /** + * Get provider specific settings. + * + * @return the providerSpecificDetails value + */ + public ProviderSpecificFailoverInput providerSpecificDetails() { + return this.providerSpecificDetails; + } + + /** + * Set provider specific settings. + * + * @param providerSpecificDetails the providerSpecificDetails value to set + * @return the UnplannedFailoverInputProperties object itself. + */ + public UnplannedFailoverInputProperties withProviderSpecificDetails(ProviderSpecificFailoverInput providerSpecificDetails) { + this.providerSpecificDetails = providerSpecificDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateMobilityServiceRequest.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateMobilityServiceRequest.java new file mode 100644 index 0000000000000..763d3bb396b10 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateMobilityServiceRequest.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Request to update the mobility service on a protected item. + */ +public class UpdateMobilityServiceRequest { + /** + * The properties of the update mobility service request. + */ + @JsonProperty(value = "properties") + private UpdateMobilityServiceRequestProperties properties; + + /** + * Get the properties of the update mobility service request. + * + * @return the properties value + */ + public UpdateMobilityServiceRequestProperties properties() { + return this.properties; + } + + /** + * Set the properties of the update mobility service request. + * + * @param properties the properties value to set + * @return the UpdateMobilityServiceRequest object itself. + */ + public UpdateMobilityServiceRequest withProperties(UpdateMobilityServiceRequestProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateMobilityServiceRequestProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateMobilityServiceRequestProperties.java new file mode 100644 index 0000000000000..f8de98b3ceb34 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateMobilityServiceRequestProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of an update mobility service request. + */ +public class UpdateMobilityServiceRequestProperties { + /** + * The CS run as account Id. + */ + @JsonProperty(value = "runAsAccountId") + private String runAsAccountId; + + /** + * Get the CS run as account Id. + * + * @return the runAsAccountId value + */ + public String runAsAccountId() { + return this.runAsAccountId; + } + + /** + * Set the CS run as account Id. + * + * @param runAsAccountId the runAsAccountId value to set + * @return the UpdateMobilityServiceRequestProperties object itself. + */ + public UpdateMobilityServiceRequestProperties withRunAsAccountId(String runAsAccountId) { + this.runAsAccountId = runAsAccountId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateNetworkMappingInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateNetworkMappingInput.java new file mode 100644 index 0000000000000..c6ef672f9c446 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateNetworkMappingInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Update network mapping input. + */ +public class UpdateNetworkMappingInput { + /** + * The input properties needed to update network mapping. + */ + @JsonProperty(value = "properties") + private UpdateNetworkMappingInputProperties properties; + + /** + * Get the input properties needed to update network mapping. + * + * @return the properties value + */ + public UpdateNetworkMappingInputProperties properties() { + return this.properties; + } + + /** + * Set the input properties needed to update network mapping. + * + * @param properties the properties value to set + * @return the UpdateNetworkMappingInput object itself. + */ + public UpdateNetworkMappingInput withProperties(UpdateNetworkMappingInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateNetworkMappingInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateNetworkMappingInputProperties.java new file mode 100644 index 0000000000000..418e40c85fb79 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateNetworkMappingInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Common input details for network mapping operation. + */ +public class UpdateNetworkMappingInputProperties { + /** + * Recovery fabric name. + */ + @JsonProperty(value = "recoveryFabricName") + private String recoveryFabricName; + + /** + * Recovery network Id. + */ + @JsonProperty(value = "recoveryNetworkId") + private String recoveryNetworkId; + + /** + * Fabrics specific input network Id. + */ + @JsonProperty(value = "fabricSpecificDetails") + private FabricSpecificUpdateNetworkMappingInput fabricSpecificDetails; + + /** + * Get recovery fabric name. + * + * @return the recoveryFabricName value + */ + public String recoveryFabricName() { + return this.recoveryFabricName; + } + + /** + * Set recovery fabric name. + * + * @param recoveryFabricName the recoveryFabricName value to set + * @return the UpdateNetworkMappingInputProperties object itself. + */ + public UpdateNetworkMappingInputProperties withRecoveryFabricName(String recoveryFabricName) { + this.recoveryFabricName = recoveryFabricName; + return this; + } + + /** + * Get recovery network Id. + * + * @return the recoveryNetworkId value + */ + public String recoveryNetworkId() { + return this.recoveryNetworkId; + } + + /** + * Set recovery network Id. + * + * @param recoveryNetworkId the recoveryNetworkId value to set + * @return the UpdateNetworkMappingInputProperties object itself. + */ + public UpdateNetworkMappingInputProperties withRecoveryNetworkId(String recoveryNetworkId) { + this.recoveryNetworkId = recoveryNetworkId; + return this; + } + + /** + * Get fabrics specific input network Id. + * + * @return the fabricSpecificDetails value + */ + public FabricSpecificUpdateNetworkMappingInput fabricSpecificDetails() { + return this.fabricSpecificDetails; + } + + /** + * Set fabrics specific input network Id. + * + * @param fabricSpecificDetails the fabricSpecificDetails value to set + * @return the UpdateNetworkMappingInputProperties object itself. + */ + public UpdateNetworkMappingInputProperties withFabricSpecificDetails(FabricSpecificUpdateNetworkMappingInput fabricSpecificDetails) { + this.fabricSpecificDetails = fabricSpecificDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdatePolicyInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdatePolicyInput.java new file mode 100644 index 0000000000000..cb79dabcc6519 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdatePolicyInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Update protection profile input. + */ +public class UpdatePolicyInput { + /** + * The ReplicationProviderSettings. + */ + @JsonProperty(value = "properties") + private UpdatePolicyInputProperties properties; + + /** + * Get the ReplicationProviderSettings. + * + * @return the properties value + */ + public UpdatePolicyInputProperties properties() { + return this.properties; + } + + /** + * Set the ReplicationProviderSettings. + * + * @param properties the properties value to set + * @return the UpdatePolicyInput object itself. + */ + public UpdatePolicyInput withProperties(UpdatePolicyInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdatePolicyInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdatePolicyInputProperties.java new file mode 100644 index 0000000000000..cf0d225bbe54c --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdatePolicyInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Policy update properties. + */ +public class UpdatePolicyInputProperties { + /** + * The ReplicationProviderSettings. + */ + @JsonProperty(value = "replicationProviderSettings") + private PolicyProviderSpecificInput replicationProviderSettings; + + /** + * Get the ReplicationProviderSettings. + * + * @return the replicationProviderSettings value + */ + public PolicyProviderSpecificInput replicationProviderSettings() { + return this.replicationProviderSettings; + } + + /** + * Set the ReplicationProviderSettings. + * + * @param replicationProviderSettings the replicationProviderSettings value to set + * @return the UpdatePolicyInputProperties object itself. + */ + public UpdatePolicyInputProperties withReplicationProviderSettings(PolicyProviderSpecificInput replicationProviderSettings) { + this.replicationProviderSettings = replicationProviderSettings; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateRecoveryPlanInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateRecoveryPlanInput.java new file mode 100644 index 0000000000000..4330ca8e59576 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateRecoveryPlanInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Update recovery plan input class. + */ +public class UpdateRecoveryPlanInput { + /** + * Recovery plan update properties. + */ + @JsonProperty(value = "properties") + private UpdateRecoveryPlanInputProperties properties; + + /** + * Get recovery plan update properties. + * + * @return the properties value + */ + public UpdateRecoveryPlanInputProperties properties() { + return this.properties; + } + + /** + * Set recovery plan update properties. + * + * @param properties the properties value to set + * @return the UpdateRecoveryPlanInput object itself. + */ + public UpdateRecoveryPlanInput withProperties(UpdateRecoveryPlanInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateRecoveryPlanInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateRecoveryPlanInputProperties.java new file mode 100644 index 0000000000000..4a6637f833011 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateRecoveryPlanInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Recovery plan updation properties. + */ +public class UpdateRecoveryPlanInputProperties { + /** + * The recovery plan groups. + */ + @JsonProperty(value = "groups") + private List groups; + + /** + * Get the recovery plan groups. + * + * @return the groups value + */ + public List groups() { + return this.groups; + } + + /** + * Set the recovery plan groups. + * + * @param groups the groups value to set + * @return the UpdateRecoveryPlanInputProperties object itself. + */ + public UpdateRecoveryPlanInputProperties withGroups(List groups) { + this.groups = groups; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateReplicationProtectedItemInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateReplicationProtectedItemInput.java new file mode 100644 index 0000000000000..bb43f1431d12d --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateReplicationProtectedItemInput.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Update replication protected item input. + */ +public class UpdateReplicationProtectedItemInput { + /** + * Update replication protected item properties. + */ + @JsonProperty(value = "properties") + private UpdateReplicationProtectedItemInputProperties properties; + + /** + * Get update replication protected item properties. + * + * @return the properties value + */ + public UpdateReplicationProtectedItemInputProperties properties() { + return this.properties; + } + + /** + * Set update replication protected item properties. + * + * @param properties the properties value to set + * @return the UpdateReplicationProtectedItemInput object itself. + */ + public UpdateReplicationProtectedItemInput withProperties(UpdateReplicationProtectedItemInputProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateReplicationProtectedItemInputProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateReplicationProtectedItemInputProperties.java new file mode 100644 index 0000000000000..9dd08ac961626 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateReplicationProtectedItemInputProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Update protected item input properties. + */ +public class UpdateReplicationProtectedItemInputProperties { + /** + * Target azure VM name given by the user. + */ + @JsonProperty(value = "recoveryAzureVMName") + private String recoveryAzureVMName; + + /** + * Target Azure Vm size. + */ + @JsonProperty(value = "recoveryAzureVMSize") + private String recoveryAzureVMSize; + + /** + * Target Azure Network Id. + */ + @JsonProperty(value = "selectedRecoveryAzureNetworkId") + private String selectedRecoveryAzureNetworkId; + + /** + * The selected option to enable RDP\SSH on target vm after failover. + * String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + */ + @JsonProperty(value = "enableRDPOnTargetOption") + private String enableRDPOnTargetOption; + + /** + * The list of vm nic details. + */ + @JsonProperty(value = "vmNics") + private List vmNics; + + /** + * License type. Possible values include: 'NotSpecified', 'NoLicenseType', + * 'WindowsServer'. + */ + @JsonProperty(value = "licenseType") + private LicenseType licenseType; + + /** + * The target availability set id. + */ + @JsonProperty(value = "recoveryAvailabilitySetId") + private String recoveryAvailabilitySetId; + + /** + * The provider specific input to update replication protected item. + */ + @JsonProperty(value = "providerSpecificDetails") + private UpdateReplicationProtectedItemProviderInput providerSpecificDetails; + + /** + * Get target azure VM name given by the user. + * + * @return the recoveryAzureVMName value + */ + public String recoveryAzureVMName() { + return this.recoveryAzureVMName; + } + + /** + * Set target azure VM name given by the user. + * + * @param recoveryAzureVMName the recoveryAzureVMName value to set + * @return the UpdateReplicationProtectedItemInputProperties object itself. + */ + public UpdateReplicationProtectedItemInputProperties withRecoveryAzureVMName(String recoveryAzureVMName) { + this.recoveryAzureVMName = recoveryAzureVMName; + return this; + } + + /** + * Get target Azure Vm size. + * + * @return the recoveryAzureVMSize value + */ + public String recoveryAzureVMSize() { + return this.recoveryAzureVMSize; + } + + /** + * Set target Azure Vm size. + * + * @param recoveryAzureVMSize the recoveryAzureVMSize value to set + * @return the UpdateReplicationProtectedItemInputProperties object itself. + */ + public UpdateReplicationProtectedItemInputProperties withRecoveryAzureVMSize(String recoveryAzureVMSize) { + this.recoveryAzureVMSize = recoveryAzureVMSize; + return this; + } + + /** + * Get target Azure Network Id. + * + * @return the selectedRecoveryAzureNetworkId value + */ + public String selectedRecoveryAzureNetworkId() { + return this.selectedRecoveryAzureNetworkId; + } + + /** + * Set target Azure Network Id. + * + * @param selectedRecoveryAzureNetworkId the selectedRecoveryAzureNetworkId value to set + * @return the UpdateReplicationProtectedItemInputProperties object itself. + */ + public UpdateReplicationProtectedItemInputProperties withSelectedRecoveryAzureNetworkId(String selectedRecoveryAzureNetworkId) { + this.selectedRecoveryAzureNetworkId = selectedRecoveryAzureNetworkId; + return this; + } + + /** + * Get the selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + * + * @return the enableRDPOnTargetOption value + */ + public String enableRDPOnTargetOption() { + return this.enableRDPOnTargetOption; + } + + /** + * Set the selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + * + * @param enableRDPOnTargetOption the enableRDPOnTargetOption value to set + * @return the UpdateReplicationProtectedItemInputProperties object itself. + */ + public UpdateReplicationProtectedItemInputProperties withEnableRDPOnTargetOption(String enableRDPOnTargetOption) { + this.enableRDPOnTargetOption = enableRDPOnTargetOption; + return this; + } + + /** + * Get the list of vm nic details. + * + * @return the vmNics value + */ + public List vmNics() { + return this.vmNics; + } + + /** + * Set the list of vm nic details. + * + * @param vmNics the vmNics value to set + * @return the UpdateReplicationProtectedItemInputProperties object itself. + */ + public UpdateReplicationProtectedItemInputProperties withVmNics(List vmNics) { + this.vmNics = vmNics; + return this; + } + + /** + * Get license type. Possible values include: 'NotSpecified', 'NoLicenseType', 'WindowsServer'. + * + * @return the licenseType value + */ + public LicenseType licenseType() { + return this.licenseType; + } + + /** + * Set license type. Possible values include: 'NotSpecified', 'NoLicenseType', 'WindowsServer'. + * + * @param licenseType the licenseType value to set + * @return the UpdateReplicationProtectedItemInputProperties object itself. + */ + public UpdateReplicationProtectedItemInputProperties withLicenseType(LicenseType licenseType) { + this.licenseType = licenseType; + return this; + } + + /** + * Get the target availability set id. + * + * @return the recoveryAvailabilitySetId value + */ + public String recoveryAvailabilitySetId() { + return this.recoveryAvailabilitySetId; + } + + /** + * Set the target availability set id. + * + * @param recoveryAvailabilitySetId the recoveryAvailabilitySetId value to set + * @return the UpdateReplicationProtectedItemInputProperties object itself. + */ + public UpdateReplicationProtectedItemInputProperties withRecoveryAvailabilitySetId(String recoveryAvailabilitySetId) { + this.recoveryAvailabilitySetId = recoveryAvailabilitySetId; + return this; + } + + /** + * Get the provider specific input to update replication protected item. + * + * @return the providerSpecificDetails value + */ + public UpdateReplicationProtectedItemProviderInput providerSpecificDetails() { + return this.providerSpecificDetails; + } + + /** + * Set the provider specific input to update replication protected item. + * + * @param providerSpecificDetails the providerSpecificDetails value to set + * @return the UpdateReplicationProtectedItemInputProperties object itself. + */ + public UpdateReplicationProtectedItemInputProperties withProviderSpecificDetails(UpdateReplicationProtectedItemProviderInput providerSpecificDetails) { + this.providerSpecificDetails = providerSpecificDetails; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateReplicationProtectedItemProviderInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateReplicationProtectedItemProviderInput.java new file mode 100644 index 0000000000000..403924aa484ce --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateReplicationProtectedItemProviderInput.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Update replication protected item provider specific input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("UpdateReplicationProtectedItemProviderInput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "HyperVReplicaAzure", value = HyperVReplicaAzureUpdateReplicationProtectedItemInput.class), + @JsonSubTypes.Type(name = "InMageAzureV2", value = InMageAzureV2UpdateReplicationProtectedItemInput.class), + @JsonSubTypes.Type(name = "A2A", value = A2AUpdateReplicationProtectedItemInput.class) +}) +public class UpdateReplicationProtectedItemProviderInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateVCenterRequest.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateVCenterRequest.java new file mode 100644 index 0000000000000..7f5ee8357a2a2 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateVCenterRequest.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input required to update vCenter. + */ +public class UpdateVCenterRequest { + /** + * The update VCenter Request Properties. + */ + @JsonProperty(value = "properties") + private UpdateVCenterRequestProperties properties; + + /** + * Get the update VCenter Request Properties. + * + * @return the properties value + */ + public UpdateVCenterRequestProperties properties() { + return this.properties; + } + + /** + * Set the update VCenter Request Properties. + * + * @param properties the properties value to set + * @return the UpdateVCenterRequest object itself. + */ + public UpdateVCenterRequest withProperties(UpdateVCenterRequestProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateVCenterRequestProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateVCenterRequestProperties.java new file mode 100644 index 0000000000000..6551f60a6aaf4 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/UpdateVCenterRequestProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of an update vCenter request. + */ +public class UpdateVCenterRequestProperties { + /** + * The friendly name of the vCenter. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * The IP address of the vCenter to be discovered. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * The process server Id from where the update can be orchestrated. + */ + @JsonProperty(value = "processServerId") + private String processServerId; + + /** + * The port number for discovery. + */ + @JsonProperty(value = "port") + private String port; + + /** + * The CS account Id which has priviliges to update the vCenter. + */ + @JsonProperty(value = "runAsAccountId") + private String runAsAccountId; + + /** + * Get the friendly name of the vCenter. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the friendly name of the vCenter. + * + * @param friendlyName the friendlyName value to set + * @return the UpdateVCenterRequestProperties object itself. + */ + public UpdateVCenterRequestProperties withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the IP address of the vCenter to be discovered. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the IP address of the vCenter to be discovered. + * + * @param ipAddress the ipAddress value to set + * @return the UpdateVCenterRequestProperties object itself. + */ + public UpdateVCenterRequestProperties withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the process server Id from where the update can be orchestrated. + * + * @return the processServerId value + */ + public String processServerId() { + return this.processServerId; + } + + /** + * Set the process server Id from where the update can be orchestrated. + * + * @param processServerId the processServerId value to set + * @return the UpdateVCenterRequestProperties object itself. + */ + public UpdateVCenterRequestProperties withProcessServerId(String processServerId) { + this.processServerId = processServerId; + return this; + } + + /** + * Get the port number for discovery. + * + * @return the port value + */ + public String port() { + return this.port; + } + + /** + * Set the port number for discovery. + * + * @param port the port value to set + * @return the UpdateVCenterRequestProperties object itself. + */ + public UpdateVCenterRequestProperties withPort(String port) { + this.port = port; + return this; + } + + /** + * Get the CS account Id which has priviliges to update the vCenter. + * + * @return the runAsAccountId value + */ + public String runAsAccountId() { + return this.runAsAccountId; + } + + /** + * Set the CS account Id which has priviliges to update the vCenter. + * + * @param runAsAccountId the runAsAccountId value to set + * @return the UpdateVCenterRequestProperties object itself. + */ + public UpdateVCenterRequestProperties withRunAsAccountId(String runAsAccountId) { + this.runAsAccountId = runAsAccountId; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VCenter.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VCenter.java new file mode 100644 index 0000000000000..ebaf927e5fada --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VCenter.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.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.VCenterInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; + +/** + * Type representing VCenter. + */ +public interface VCenter extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + VCenterProperties properties(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the VCenter definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithReplicationFabric, DefinitionStages.WithCreate { + } + + /** + * Grouping of VCenter definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a VCenter definition. + */ + interface Blank extends WithReplicationFabric { + } + + /** + * The stage of the vcenter definition allowing to specify ReplicationFabric. + */ + interface WithReplicationFabric { + /** + * Specifies fabricName. + */ + WithCreate withExistingReplicationFabric(String fabricName); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a VCenter update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable { + } + + /** + * Grouping of VCenter update stages. + */ + interface UpdateStages { + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VCenterProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VCenterProperties.java new file mode 100644 index 0000000000000..5f0a8ee45c632 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VCenterProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * vCenter properties. + */ +public class VCenterProperties { + /** + * Friendly name of the vCenter. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * VCenter internal ID. + */ + @JsonProperty(value = "internalId") + private String internalId; + + /** + * The time when the last heartbeat was reveived by vCenter. + */ + @JsonProperty(value = "lastHeartbeat") + private DateTime lastHeartbeat; + + /** + * The VCenter discovery status. + */ + @JsonProperty(value = "discoveryStatus") + private String discoveryStatus; + + /** + * The process server Id. + */ + @JsonProperty(value = "processServerId") + private String processServerId; + + /** + * The IP address of the vCenter. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * The infrastructure Id of vCenter. + */ + @JsonProperty(value = "infrastructureId") + private String infrastructureId; + + /** + * The port number for discovery. + */ + @JsonProperty(value = "port") + private String port; + + /** + * The account Id which has privileges to discover the vCenter. + */ + @JsonProperty(value = "runAsAccountId") + private String runAsAccountId; + + /** + * The ARM resource name of the fabric containing this VCenter. + */ + @JsonProperty(value = "fabricArmResourceName") + private String fabricArmResourceName; + + /** + * Get friendly name of the vCenter. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set friendly name of the vCenter. + * + * @param friendlyName the friendlyName value to set + * @return the VCenterProperties object itself. + */ + public VCenterProperties withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get vCenter internal ID. + * + * @return the internalId value + */ + public String internalId() { + return this.internalId; + } + + /** + * Set vCenter internal ID. + * + * @param internalId the internalId value to set + * @return the VCenterProperties object itself. + */ + public VCenterProperties withInternalId(String internalId) { + this.internalId = internalId; + return this; + } + + /** + * Get the time when the last heartbeat was reveived by vCenter. + * + * @return the lastHeartbeat value + */ + public DateTime lastHeartbeat() { + return this.lastHeartbeat; + } + + /** + * Set the time when the last heartbeat was reveived by vCenter. + * + * @param lastHeartbeat the lastHeartbeat value to set + * @return the VCenterProperties object itself. + */ + public VCenterProperties withLastHeartbeat(DateTime lastHeartbeat) { + this.lastHeartbeat = lastHeartbeat; + return this; + } + + /** + * Get the VCenter discovery status. + * + * @return the discoveryStatus value + */ + public String discoveryStatus() { + return this.discoveryStatus; + } + + /** + * Set the VCenter discovery status. + * + * @param discoveryStatus the discoveryStatus value to set + * @return the VCenterProperties object itself. + */ + public VCenterProperties withDiscoveryStatus(String discoveryStatus) { + this.discoveryStatus = discoveryStatus; + return this; + } + + /** + * Get the process server Id. + * + * @return the processServerId value + */ + public String processServerId() { + return this.processServerId; + } + + /** + * Set the process server Id. + * + * @param processServerId the processServerId value to set + * @return the VCenterProperties object itself. + */ + public VCenterProperties withProcessServerId(String processServerId) { + this.processServerId = processServerId; + return this; + } + + /** + * Get the IP address of the vCenter. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the IP address of the vCenter. + * + * @param ipAddress the ipAddress value to set + * @return the VCenterProperties object itself. + */ + public VCenterProperties withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the infrastructure Id of vCenter. + * + * @return the infrastructureId value + */ + public String infrastructureId() { + return this.infrastructureId; + } + + /** + * Set the infrastructure Id of vCenter. + * + * @param infrastructureId the infrastructureId value to set + * @return the VCenterProperties object itself. + */ + public VCenterProperties withInfrastructureId(String infrastructureId) { + this.infrastructureId = infrastructureId; + return this; + } + + /** + * Get the port number for discovery. + * + * @return the port value + */ + public String port() { + return this.port; + } + + /** + * Set the port number for discovery. + * + * @param port the port value to set + * @return the VCenterProperties object itself. + */ + public VCenterProperties withPort(String port) { + this.port = port; + return this; + } + + /** + * Get the account Id which has privileges to discover the vCenter. + * + * @return the runAsAccountId value + */ + public String runAsAccountId() { + return this.runAsAccountId; + } + + /** + * Set the account Id which has privileges to discover the vCenter. + * + * @param runAsAccountId the runAsAccountId value to set + * @return the VCenterProperties object itself. + */ + public VCenterProperties withRunAsAccountId(String runAsAccountId) { + this.runAsAccountId = runAsAccountId; + return this; + } + + /** + * Get the ARM resource name of the fabric containing this VCenter. + * + * @return the fabricArmResourceName value + */ + public String fabricArmResourceName() { + return this.fabricArmResourceName; + } + + /** + * Set the ARM resource name of the fabric containing this VCenter. + * + * @param fabricArmResourceName the fabricArmResourceName value to set + * @return the VCenterProperties object itself. + */ + public VCenterProperties withFabricArmResourceName(String fabricArmResourceName) { + this.fabricArmResourceName = fabricArmResourceName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMNicDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMNicDetails.java new file mode 100644 index 0000000000000..e1c693fd24a04 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMNicDetails.java @@ -0,0 +1,329 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Hyper V VM network details. + */ +public class VMNicDetails { + /** + * The nic Id. + */ + @JsonProperty(value = "nicId") + private String nicId; + + /** + * The replica nic Id. + */ + @JsonProperty(value = "replicaNicId") + private String replicaNicId; + + /** + * The source nic ARM Id. + */ + @JsonProperty(value = "sourceNicArmId") + private String sourceNicArmId; + + /** + * VM subnet name. + */ + @JsonProperty(value = "vMSubnetName") + private String vMSubnetName; + + /** + * VM network name. + */ + @JsonProperty(value = "vMNetworkName") + private String vMNetworkName; + + /** + * Recovery VM network Id. + */ + @JsonProperty(value = "recoveryVMNetworkId") + private String recoveryVMNetworkId; + + /** + * Recovery VM subnet name. + */ + @JsonProperty(value = "recoveryVMSubnetName") + private String recoveryVMSubnetName; + + /** + * Ip address type. + */ + @JsonProperty(value = "ipAddressType") + private String ipAddressType; + + /** + * Primary nic static IP address. + */ + @JsonProperty(value = "primaryNicStaticIPAddress") + private String primaryNicStaticIPAddress; + + /** + * Replica nic static IP address. + */ + @JsonProperty(value = "replicaNicStaticIPAddress") + private String replicaNicStaticIPAddress; + + /** + * Selection type for failover. + */ + @JsonProperty(value = "selectionType") + private String selectionType; + + /** + * IP allocation type for recovery VM. + */ + @JsonProperty(value = "recoveryNicIpAddressType") + private String recoveryNicIpAddressType; + + /** + * Get the nic Id. + * + * @return the nicId value + */ + public String nicId() { + return this.nicId; + } + + /** + * Set the nic Id. + * + * @param nicId the nicId value to set + * @return the VMNicDetails object itself. + */ + public VMNicDetails withNicId(String nicId) { + this.nicId = nicId; + return this; + } + + /** + * Get the replica nic Id. + * + * @return the replicaNicId value + */ + public String replicaNicId() { + return this.replicaNicId; + } + + /** + * Set the replica nic Id. + * + * @param replicaNicId the replicaNicId value to set + * @return the VMNicDetails object itself. + */ + public VMNicDetails withReplicaNicId(String replicaNicId) { + this.replicaNicId = replicaNicId; + return this; + } + + /** + * Get the source nic ARM Id. + * + * @return the sourceNicArmId value + */ + public String sourceNicArmId() { + return this.sourceNicArmId; + } + + /** + * Set the source nic ARM Id. + * + * @param sourceNicArmId the sourceNicArmId value to set + * @return the VMNicDetails object itself. + */ + public VMNicDetails withSourceNicArmId(String sourceNicArmId) { + this.sourceNicArmId = sourceNicArmId; + return this; + } + + /** + * Get vM subnet name. + * + * @return the vMSubnetName value + */ + public String vMSubnetName() { + return this.vMSubnetName; + } + + /** + * Set vM subnet name. + * + * @param vMSubnetName the vMSubnetName value to set + * @return the VMNicDetails object itself. + */ + public VMNicDetails withVMSubnetName(String vMSubnetName) { + this.vMSubnetName = vMSubnetName; + return this; + } + + /** + * Get vM network name. + * + * @return the vMNetworkName value + */ + public String vMNetworkName() { + return this.vMNetworkName; + } + + /** + * Set vM network name. + * + * @param vMNetworkName the vMNetworkName value to set + * @return the VMNicDetails object itself. + */ + public VMNicDetails withVMNetworkName(String vMNetworkName) { + this.vMNetworkName = vMNetworkName; + return this; + } + + /** + * Get recovery VM network Id. + * + * @return the recoveryVMNetworkId value + */ + public String recoveryVMNetworkId() { + return this.recoveryVMNetworkId; + } + + /** + * Set recovery VM network Id. + * + * @param recoveryVMNetworkId the recoveryVMNetworkId value to set + * @return the VMNicDetails object itself. + */ + public VMNicDetails withRecoveryVMNetworkId(String recoveryVMNetworkId) { + this.recoveryVMNetworkId = recoveryVMNetworkId; + return this; + } + + /** + * Get recovery VM subnet name. + * + * @return the recoveryVMSubnetName value + */ + public String recoveryVMSubnetName() { + return this.recoveryVMSubnetName; + } + + /** + * Set recovery VM subnet name. + * + * @param recoveryVMSubnetName the recoveryVMSubnetName value to set + * @return the VMNicDetails object itself. + */ + public VMNicDetails withRecoveryVMSubnetName(String recoveryVMSubnetName) { + this.recoveryVMSubnetName = recoveryVMSubnetName; + return this; + } + + /** + * Get ip address type. + * + * @return the ipAddressType value + */ + public String ipAddressType() { + return this.ipAddressType; + } + + /** + * Set ip address type. + * + * @param ipAddressType the ipAddressType value to set + * @return the VMNicDetails object itself. + */ + public VMNicDetails withIpAddressType(String ipAddressType) { + this.ipAddressType = ipAddressType; + return this; + } + + /** + * Get primary nic static IP address. + * + * @return the primaryNicStaticIPAddress value + */ + public String primaryNicStaticIPAddress() { + return this.primaryNicStaticIPAddress; + } + + /** + * Set primary nic static IP address. + * + * @param primaryNicStaticIPAddress the primaryNicStaticIPAddress value to set + * @return the VMNicDetails object itself. + */ + public VMNicDetails withPrimaryNicStaticIPAddress(String primaryNicStaticIPAddress) { + this.primaryNicStaticIPAddress = primaryNicStaticIPAddress; + return this; + } + + /** + * Get replica nic static IP address. + * + * @return the replicaNicStaticIPAddress value + */ + public String replicaNicStaticIPAddress() { + return this.replicaNicStaticIPAddress; + } + + /** + * Set replica nic static IP address. + * + * @param replicaNicStaticIPAddress the replicaNicStaticIPAddress value to set + * @return the VMNicDetails object itself. + */ + public VMNicDetails withReplicaNicStaticIPAddress(String replicaNicStaticIPAddress) { + this.replicaNicStaticIPAddress = replicaNicStaticIPAddress; + return this; + } + + /** + * Get selection type for failover. + * + * @return the selectionType value + */ + public String selectionType() { + return this.selectionType; + } + + /** + * Set selection type for failover. + * + * @param selectionType the selectionType value to set + * @return the VMNicDetails object itself. + */ + public VMNicDetails withSelectionType(String selectionType) { + this.selectionType = selectionType; + return this; + } + + /** + * Get iP allocation type for recovery VM. + * + * @return the recoveryNicIpAddressType value + */ + public String recoveryNicIpAddressType() { + return this.recoveryNicIpAddressType; + } + + /** + * Set iP allocation type for recovery VM. + * + * @param recoveryNicIpAddressType the recoveryNicIpAddressType value to set + * @return the VMNicDetails object itself. + */ + public VMNicDetails withRecoveryNicIpAddressType(String recoveryNicIpAddressType) { + this.recoveryNicIpAddressType = recoveryNicIpAddressType; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMNicInputDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMNicInputDetails.java new file mode 100644 index 0000000000000..39941c4fa42dd --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMNicInputDetails.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.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Hyper V VM network input details. + */ +public class VMNicInputDetails { + /** + * The nic Id. + */ + @JsonProperty(value = "nicId") + private String nicId; + + /** + * Recovery VM subnet name. + */ + @JsonProperty(value = "recoveryVMSubnetName") + private String recoveryVMSubnetName; + + /** + * Replica nic static IP address. + */ + @JsonProperty(value = "replicaNicStaticIPAddress") + private String replicaNicStaticIPAddress; + + /** + * Selection type for failover. + */ + @JsonProperty(value = "selectionType") + private String selectionType; + + /** + * Get the nic Id. + * + * @return the nicId value + */ + public String nicId() { + return this.nicId; + } + + /** + * Set the nic Id. + * + * @param nicId the nicId value to set + * @return the VMNicInputDetails object itself. + */ + public VMNicInputDetails withNicId(String nicId) { + this.nicId = nicId; + return this; + } + + /** + * Get recovery VM subnet name. + * + * @return the recoveryVMSubnetName value + */ + public String recoveryVMSubnetName() { + return this.recoveryVMSubnetName; + } + + /** + * Set recovery VM subnet name. + * + * @param recoveryVMSubnetName the recoveryVMSubnetName value to set + * @return the VMNicInputDetails object itself. + */ + public VMNicInputDetails withRecoveryVMSubnetName(String recoveryVMSubnetName) { + this.recoveryVMSubnetName = recoveryVMSubnetName; + return this; + } + + /** + * Get replica nic static IP address. + * + * @return the replicaNicStaticIPAddress value + */ + public String replicaNicStaticIPAddress() { + return this.replicaNicStaticIPAddress; + } + + /** + * Set replica nic static IP address. + * + * @param replicaNicStaticIPAddress the replicaNicStaticIPAddress value to set + * @return the VMNicInputDetails object itself. + */ + public VMNicInputDetails withReplicaNicStaticIPAddress(String replicaNicStaticIPAddress) { + this.replicaNicStaticIPAddress = replicaNicStaticIPAddress; + return this; + } + + /** + * Get selection type for failover. + * + * @return the selectionType value + */ + public String selectionType() { + return this.selectionType; + } + + /** + * Set selection type for failover. + * + * @param selectionType the selectionType value to set + * @return the VMNicInputDetails object itself. + */ + public VMNicInputDetails withSelectionType(String selectionType) { + this.selectionType = selectionType; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareCbtPolicyCreationInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareCbtPolicyCreationInput.java new file mode 100644 index 0000000000000..ee371d5c35f4a --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareCbtPolicyCreationInput.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * VMware Cbt Policy creation input. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("VMwareCbt") +public class VMwareCbtPolicyCreationInput extends PolicyProviderSpecificInput { + /** + * The duration in minutes until which the recovery points need to be + * stored. + */ + @JsonProperty(value = "recoveryPointHistory") + private Integer recoveryPointHistory; + + /** + * The crash consistent snapshot frequency (in minutes). + */ + @JsonProperty(value = "crashConsistentFrequencyInMinutes") + private Integer crashConsistentFrequencyInMinutes; + + /** + * The app consistent snapshot frequency (in minutes). + */ + @JsonProperty(value = "appConsistentFrequencyInMinutes") + private Integer appConsistentFrequencyInMinutes; + + /** + * Get the duration in minutes until which the recovery points need to be stored. + * + * @return the recoveryPointHistory value + */ + public Integer recoveryPointHistory() { + return this.recoveryPointHistory; + } + + /** + * Set the duration in minutes until which the recovery points need to be stored. + * + * @param recoveryPointHistory the recoveryPointHistory value to set + * @return the VMwareCbtPolicyCreationInput object itself. + */ + public VMwareCbtPolicyCreationInput withRecoveryPointHistory(Integer recoveryPointHistory) { + this.recoveryPointHistory = recoveryPointHistory; + return this; + } + + /** + * Get the crash consistent snapshot frequency (in minutes). + * + * @return the crashConsistentFrequencyInMinutes value + */ + public Integer crashConsistentFrequencyInMinutes() { + return this.crashConsistentFrequencyInMinutes; + } + + /** + * Set the crash consistent snapshot frequency (in minutes). + * + * @param crashConsistentFrequencyInMinutes the crashConsistentFrequencyInMinutes value to set + * @return the VMwareCbtPolicyCreationInput object itself. + */ + public VMwareCbtPolicyCreationInput withCrashConsistentFrequencyInMinutes(Integer crashConsistentFrequencyInMinutes) { + this.crashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + return this; + } + + /** + * Get the app consistent snapshot frequency (in minutes). + * + * @return the appConsistentFrequencyInMinutes value + */ + public Integer appConsistentFrequencyInMinutes() { + return this.appConsistentFrequencyInMinutes; + } + + /** + * Set the app consistent snapshot frequency (in minutes). + * + * @param appConsistentFrequencyInMinutes the appConsistentFrequencyInMinutes value to set + * @return the VMwareCbtPolicyCreationInput object itself. + */ + public VMwareCbtPolicyCreationInput withAppConsistentFrequencyInMinutes(Integer appConsistentFrequencyInMinutes) { + this.appConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareDetails.java new file mode 100644 index 0000000000000..8fd8d34a3c3dc --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareDetails.java @@ -0,0 +1,803 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Store the fabric details specific to the VMware fabric. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("VMware") +public class VMwareDetails extends FabricSpecificDetails { + /** + * The list of Process Servers associated with the fabric. + */ + @JsonProperty(value = "processServers") + private List processServers; + + /** + * The list of Master Target servers associated with the fabric. + */ + @JsonProperty(value = "masterTargetServers") + private List masterTargetServers; + + /** + * The list of run as accounts created on the server. + */ + @JsonProperty(value = "runAsAccounts") + private List runAsAccounts; + + /** + * The number of replication pairs configured in this CS. + */ + @JsonProperty(value = "replicationPairCount") + private String replicationPairCount; + + /** + * The number of process servers. + */ + @JsonProperty(value = "processServerCount") + private String processServerCount; + + /** + * The number of source and target servers configured to talk to this CS. + */ + @JsonProperty(value = "agentCount") + private String agentCount; + + /** + * The number of protected servers. + */ + @JsonProperty(value = "protectedServers") + private String protectedServers; + + /** + * The percentage of the system load. + */ + @JsonProperty(value = "systemLoad") + private String systemLoad; + + /** + * The system load status. + */ + @JsonProperty(value = "systemLoadStatus") + private String systemLoadStatus; + + /** + * The percentage of the CPU load. + */ + @JsonProperty(value = "cpuLoad") + private String cpuLoad; + + /** + * The CPU load status. + */ + @JsonProperty(value = "cpuLoadStatus") + private String cpuLoadStatus; + + /** + * The total memory. + */ + @JsonProperty(value = "totalMemoryInBytes") + private Long totalMemoryInBytes; + + /** + * The available memory. + */ + @JsonProperty(value = "availableMemoryInBytes") + private Long availableMemoryInBytes; + + /** + * The memory usage status. + */ + @JsonProperty(value = "memoryUsageStatus") + private String memoryUsageStatus; + + /** + * The total space. + */ + @JsonProperty(value = "totalSpaceInBytes") + private Long totalSpaceInBytes; + + /** + * The available space. + */ + @JsonProperty(value = "availableSpaceInBytes") + private Long availableSpaceInBytes; + + /** + * The space usage status. + */ + @JsonProperty(value = "spaceUsageStatus") + private String spaceUsageStatus; + + /** + * The web load. + */ + @JsonProperty(value = "webLoad") + private String webLoad; + + /** + * The web load status. + */ + @JsonProperty(value = "webLoadStatus") + private String webLoadStatus; + + /** + * The database server load. + */ + @JsonProperty(value = "databaseServerLoad") + private String databaseServerLoad; + + /** + * The database server load status. + */ + @JsonProperty(value = "databaseServerLoadStatus") + private String databaseServerLoadStatus; + + /** + * The CS service status. + */ + @JsonProperty(value = "csServiceStatus") + private String csServiceStatus; + + /** + * The IP address. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * The agent Version. + */ + @JsonProperty(value = "agentVersion") + private String agentVersion; + + /** + * The host name. + */ + @JsonProperty(value = "hostName") + private String hostName; + + /** + * The last heartbeat received from CS server. + */ + @JsonProperty(value = "lastHeartbeat") + private DateTime lastHeartbeat; + + /** + * Version status. + */ + @JsonProperty(value = "versionStatus") + private String versionStatus; + + /** + * CS SSL cert expiry date. + */ + @JsonProperty(value = "sslCertExpiryDate") + private DateTime sslCertExpiryDate; + + /** + * CS SSL cert expiry date. + */ + @JsonProperty(value = "sslCertExpiryRemainingDays") + private Integer sslCertExpiryRemainingDays; + + /** + * PS template version. + */ + @JsonProperty(value = "psTemplateVersion") + private String psTemplateVersion; + + /** + * Get the list of Process Servers associated with the fabric. + * + * @return the processServers value + */ + public List processServers() { + return this.processServers; + } + + /** + * Set the list of Process Servers associated with the fabric. + * + * @param processServers the processServers value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withProcessServers(List processServers) { + this.processServers = processServers; + return this; + } + + /** + * Get the list of Master Target servers associated with the fabric. + * + * @return the masterTargetServers value + */ + public List masterTargetServers() { + return this.masterTargetServers; + } + + /** + * Set the list of Master Target servers associated with the fabric. + * + * @param masterTargetServers the masterTargetServers value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withMasterTargetServers(List masterTargetServers) { + this.masterTargetServers = masterTargetServers; + return this; + } + + /** + * Get the list of run as accounts created on the server. + * + * @return the runAsAccounts value + */ + public List runAsAccounts() { + return this.runAsAccounts; + } + + /** + * Set the list of run as accounts created on the server. + * + * @param runAsAccounts the runAsAccounts value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withRunAsAccounts(List runAsAccounts) { + this.runAsAccounts = runAsAccounts; + return this; + } + + /** + * Get the number of replication pairs configured in this CS. + * + * @return the replicationPairCount value + */ + public String replicationPairCount() { + return this.replicationPairCount; + } + + /** + * Set the number of replication pairs configured in this CS. + * + * @param replicationPairCount the replicationPairCount value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withReplicationPairCount(String replicationPairCount) { + this.replicationPairCount = replicationPairCount; + return this; + } + + /** + * Get the number of process servers. + * + * @return the processServerCount value + */ + public String processServerCount() { + return this.processServerCount; + } + + /** + * Set the number of process servers. + * + * @param processServerCount the processServerCount value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withProcessServerCount(String processServerCount) { + this.processServerCount = processServerCount; + return this; + } + + /** + * Get the number of source and target servers configured to talk to this CS. + * + * @return the agentCount value + */ + public String agentCount() { + return this.agentCount; + } + + /** + * Set the number of source and target servers configured to talk to this CS. + * + * @param agentCount the agentCount value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withAgentCount(String agentCount) { + this.agentCount = agentCount; + return this; + } + + /** + * Get the number of protected servers. + * + * @return the protectedServers value + */ + public String protectedServers() { + return this.protectedServers; + } + + /** + * Set the number of protected servers. + * + * @param protectedServers the protectedServers value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withProtectedServers(String protectedServers) { + this.protectedServers = protectedServers; + return this; + } + + /** + * Get the percentage of the system load. + * + * @return the systemLoad value + */ + public String systemLoad() { + return this.systemLoad; + } + + /** + * Set the percentage of the system load. + * + * @param systemLoad the systemLoad value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withSystemLoad(String systemLoad) { + this.systemLoad = systemLoad; + return this; + } + + /** + * Get the system load status. + * + * @return the systemLoadStatus value + */ + public String systemLoadStatus() { + return this.systemLoadStatus; + } + + /** + * Set the system load status. + * + * @param systemLoadStatus the systemLoadStatus value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withSystemLoadStatus(String systemLoadStatus) { + this.systemLoadStatus = systemLoadStatus; + return this; + } + + /** + * Get the percentage of the CPU load. + * + * @return the cpuLoad value + */ + public String cpuLoad() { + return this.cpuLoad; + } + + /** + * Set the percentage of the CPU load. + * + * @param cpuLoad the cpuLoad value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withCpuLoad(String cpuLoad) { + this.cpuLoad = cpuLoad; + return this; + } + + /** + * Get the CPU load status. + * + * @return the cpuLoadStatus value + */ + public String cpuLoadStatus() { + return this.cpuLoadStatus; + } + + /** + * Set the CPU load status. + * + * @param cpuLoadStatus the cpuLoadStatus value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withCpuLoadStatus(String cpuLoadStatus) { + this.cpuLoadStatus = cpuLoadStatus; + return this; + } + + /** + * Get the total memory. + * + * @return the totalMemoryInBytes value + */ + public Long totalMemoryInBytes() { + return this.totalMemoryInBytes; + } + + /** + * Set the total memory. + * + * @param totalMemoryInBytes the totalMemoryInBytes value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withTotalMemoryInBytes(Long totalMemoryInBytes) { + this.totalMemoryInBytes = totalMemoryInBytes; + return this; + } + + /** + * Get the available memory. + * + * @return the availableMemoryInBytes value + */ + public Long availableMemoryInBytes() { + return this.availableMemoryInBytes; + } + + /** + * Set the available memory. + * + * @param availableMemoryInBytes the availableMemoryInBytes value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withAvailableMemoryInBytes(Long availableMemoryInBytes) { + this.availableMemoryInBytes = availableMemoryInBytes; + return this; + } + + /** + * Get the memory usage status. + * + * @return the memoryUsageStatus value + */ + public String memoryUsageStatus() { + return this.memoryUsageStatus; + } + + /** + * Set the memory usage status. + * + * @param memoryUsageStatus the memoryUsageStatus value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withMemoryUsageStatus(String memoryUsageStatus) { + this.memoryUsageStatus = memoryUsageStatus; + return this; + } + + /** + * Get the total space. + * + * @return the totalSpaceInBytes value + */ + public Long totalSpaceInBytes() { + return this.totalSpaceInBytes; + } + + /** + * Set the total space. + * + * @param totalSpaceInBytes the totalSpaceInBytes value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withTotalSpaceInBytes(Long totalSpaceInBytes) { + this.totalSpaceInBytes = totalSpaceInBytes; + return this; + } + + /** + * Get the available space. + * + * @return the availableSpaceInBytes value + */ + public Long availableSpaceInBytes() { + return this.availableSpaceInBytes; + } + + /** + * Set the available space. + * + * @param availableSpaceInBytes the availableSpaceInBytes value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withAvailableSpaceInBytes(Long availableSpaceInBytes) { + this.availableSpaceInBytes = availableSpaceInBytes; + return this; + } + + /** + * Get the space usage status. + * + * @return the spaceUsageStatus value + */ + public String spaceUsageStatus() { + return this.spaceUsageStatus; + } + + /** + * Set the space usage status. + * + * @param spaceUsageStatus the spaceUsageStatus value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withSpaceUsageStatus(String spaceUsageStatus) { + this.spaceUsageStatus = spaceUsageStatus; + return this; + } + + /** + * Get the web load. + * + * @return the webLoad value + */ + public String webLoad() { + return this.webLoad; + } + + /** + * Set the web load. + * + * @param webLoad the webLoad value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withWebLoad(String webLoad) { + this.webLoad = webLoad; + return this; + } + + /** + * Get the web load status. + * + * @return the webLoadStatus value + */ + public String webLoadStatus() { + return this.webLoadStatus; + } + + /** + * Set the web load status. + * + * @param webLoadStatus the webLoadStatus value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withWebLoadStatus(String webLoadStatus) { + this.webLoadStatus = webLoadStatus; + return this; + } + + /** + * Get the database server load. + * + * @return the databaseServerLoad value + */ + public String databaseServerLoad() { + return this.databaseServerLoad; + } + + /** + * Set the database server load. + * + * @param databaseServerLoad the databaseServerLoad value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withDatabaseServerLoad(String databaseServerLoad) { + this.databaseServerLoad = databaseServerLoad; + return this; + } + + /** + * Get the database server load status. + * + * @return the databaseServerLoadStatus value + */ + public String databaseServerLoadStatus() { + return this.databaseServerLoadStatus; + } + + /** + * Set the database server load status. + * + * @param databaseServerLoadStatus the databaseServerLoadStatus value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withDatabaseServerLoadStatus(String databaseServerLoadStatus) { + this.databaseServerLoadStatus = databaseServerLoadStatus; + return this; + } + + /** + * Get the CS service status. + * + * @return the csServiceStatus value + */ + public String csServiceStatus() { + return this.csServiceStatus; + } + + /** + * Set the CS service status. + * + * @param csServiceStatus the csServiceStatus value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withCsServiceStatus(String csServiceStatus) { + this.csServiceStatus = csServiceStatus; + return this; + } + + /** + * Get the IP address. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the IP address. + * + * @param ipAddress the ipAddress value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + 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 VMwareDetails object itself. + */ + public VMwareDetails withAgentVersion(String agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + /** + * Get the host name. + * + * @return the hostName value + */ + public String hostName() { + return this.hostName; + } + + /** + * Set the host name. + * + * @param hostName the hostName value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withHostName(String hostName) { + this.hostName = hostName; + return this; + } + + /** + * Get the last heartbeat received from CS server. + * + * @return the lastHeartbeat value + */ + public DateTime lastHeartbeat() { + return this.lastHeartbeat; + } + + /** + * Set the last heartbeat received from CS server. + * + * @param lastHeartbeat the lastHeartbeat value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withLastHeartbeat(DateTime lastHeartbeat) { + this.lastHeartbeat = lastHeartbeat; + return this; + } + + /** + * Get version status. + * + * @return the versionStatus value + */ + public String versionStatus() { + return this.versionStatus; + } + + /** + * Set version status. + * + * @param versionStatus the versionStatus value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withVersionStatus(String versionStatus) { + this.versionStatus = versionStatus; + return this; + } + + /** + * Get cS SSL cert expiry date. + * + * @return the sslCertExpiryDate value + */ + public DateTime sslCertExpiryDate() { + return this.sslCertExpiryDate; + } + + /** + * Set cS SSL cert expiry date. + * + * @param sslCertExpiryDate the sslCertExpiryDate value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withSslCertExpiryDate(DateTime sslCertExpiryDate) { + this.sslCertExpiryDate = sslCertExpiryDate; + return this; + } + + /** + * Get cS SSL cert expiry date. + * + * @return the sslCertExpiryRemainingDays value + */ + public Integer sslCertExpiryRemainingDays() { + return this.sslCertExpiryRemainingDays; + } + + /** + * Set cS SSL cert expiry date. + * + * @param sslCertExpiryRemainingDays the sslCertExpiryRemainingDays value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withSslCertExpiryRemainingDays(Integer sslCertExpiryRemainingDays) { + this.sslCertExpiryRemainingDays = sslCertExpiryRemainingDays; + return this; + } + + /** + * Get pS template version. + * + * @return the psTemplateVersion value + */ + public String psTemplateVersion() { + return this.psTemplateVersion; + } + + /** + * Set pS template version. + * + * @param psTemplateVersion the psTemplateVersion value to set + * @return the VMwareDetails object itself. + */ + public VMwareDetails withPsTemplateVersion(String psTemplateVersion) { + this.psTemplateVersion = psTemplateVersion; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareV2FabricCreationInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareV2FabricCreationInput.java new file mode 100644 index 0000000000000..19f6a5efd29e7 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareV2FabricCreationInput.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Fabric provider specific settings. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("VMwareV2") +public class VMwareV2FabricCreationInput extends FabricSpecificCreationInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareV2FabricSpecificDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareV2FabricSpecificDetails.java new file mode 100644 index 0000000000000..06c13d371c315 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareV2FabricSpecificDetails.java @@ -0,0 +1,73 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * VMwareV2 fabric Specific Details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("VMwareV2") +public class VMwareV2FabricSpecificDetails extends FabricSpecificDetails { + /** + * The endpoint for making requests to the SRS Service. + */ + @JsonProperty(value = "srsServiceEndpoint") + private String srsServiceEndpoint; + + /** + * The endpoint for making requests to the RCM Service. + */ + @JsonProperty(value = "rcmServiceEndpoint") + private String rcmServiceEndpoint; + + /** + * Get the endpoint for making requests to the SRS Service. + * + * @return the srsServiceEndpoint value + */ + public String srsServiceEndpoint() { + return this.srsServiceEndpoint; + } + + /** + * Set the endpoint for making requests to the SRS Service. + * + * @param srsServiceEndpoint the srsServiceEndpoint value to set + * @return the VMwareV2FabricSpecificDetails object itself. + */ + public VMwareV2FabricSpecificDetails withSrsServiceEndpoint(String srsServiceEndpoint) { + this.srsServiceEndpoint = srsServiceEndpoint; + return this; + } + + /** + * Get the endpoint for making requests to the RCM Service. + * + * @return the rcmServiceEndpoint value + */ + public String rcmServiceEndpoint() { + return this.rcmServiceEndpoint; + } + + /** + * Set the endpoint for making requests to the RCM Service. + * + * @param rcmServiceEndpoint the rcmServiceEndpoint value to set + * @return the VMwareV2FabricSpecificDetails object itself. + */ + public VMwareV2FabricSpecificDetails withRcmServiceEndpoint(String rcmServiceEndpoint) { + this.rcmServiceEndpoint = rcmServiceEndpoint; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareVirtualMachineDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareVirtualMachineDetails.java new file mode 100644 index 0000000000000..8ba73f6ca34e6 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VMwareVirtualMachineDetails.java @@ -0,0 +1,284 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * VMware provider specific settings. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("VMwareVirtualMachine") +public class VMwareVirtualMachineDetails extends ConfigurationSettings { + /** + * The ID generated by the InMage agent after it gets installed on guest. + * This is the ID to be used during InMage CreateProtection. + */ + @JsonProperty(value = "agentGeneratedId") + private String agentGeneratedId; + + /** + * The value indicating if InMage scout agent is installed on guest. + */ + @JsonProperty(value = "agentInstalled") + private String agentInstalled; + + /** + * The OsType installed on VM. + */ + @JsonProperty(value = "osType") + private String osType; + + /** + * The agent version. + */ + @JsonProperty(value = "agentVersion") + private String agentVersion; + + /** + * The IP address. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * The value indicating whether VM is powered on. + */ + @JsonProperty(value = "poweredOn") + private String poweredOn; + + /** + * The VCenter infrastructure Id. + */ + @JsonProperty(value = "vCenterInfrastructureId") + private String vCenterInfrastructureId; + + /** + * A value inidicating the discovery type of the machine. Value can be + * vCenter or physical. + */ + @JsonProperty(value = "discoveryType") + private String discoveryType; + + /** + * The disk details. + */ + @JsonProperty(value = "diskDetails") + private List diskDetails; + + /** + * The validation errors. + */ + @JsonProperty(value = "validationErrors") + private List validationErrors; + + /** + * Get the ID generated by the InMage agent after it gets installed on guest. This is the ID to be used during InMage CreateProtection. + * + * @return the agentGeneratedId value + */ + public String agentGeneratedId() { + return this.agentGeneratedId; + } + + /** + * Set the ID generated by the InMage agent after it gets installed on guest. This is the ID to be used during InMage CreateProtection. + * + * @param agentGeneratedId the agentGeneratedId value to set + * @return the VMwareVirtualMachineDetails object itself. + */ + public VMwareVirtualMachineDetails withAgentGeneratedId(String agentGeneratedId) { + this.agentGeneratedId = agentGeneratedId; + return this; + } + + /** + * Get the value indicating if InMage scout agent is installed on guest. + * + * @return the agentInstalled value + */ + public String agentInstalled() { + return this.agentInstalled; + } + + /** + * Set the value indicating if InMage scout agent is installed on guest. + * + * @param agentInstalled the agentInstalled value to set + * @return the VMwareVirtualMachineDetails object itself. + */ + public VMwareVirtualMachineDetails withAgentInstalled(String agentInstalled) { + this.agentInstalled = agentInstalled; + return this; + } + + /** + * Get the OsType installed on VM. + * + * @return the osType value + */ + public String osType() { + return this.osType; + } + + /** + * Set the OsType installed on VM. + * + * @param osType the osType value to set + * @return the VMwareVirtualMachineDetails object itself. + */ + public VMwareVirtualMachineDetails withOsType(String osType) { + this.osType = osType; + 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 VMwareVirtualMachineDetails object itself. + */ + public VMwareVirtualMachineDetails withAgentVersion(String agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + /** + * Get the IP address. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the IP address. + * + * @param ipAddress the ipAddress value to set + * @return the VMwareVirtualMachineDetails object itself. + */ + public VMwareVirtualMachineDetails withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the value indicating whether VM is powered on. + * + * @return the poweredOn value + */ + public String poweredOn() { + return this.poweredOn; + } + + /** + * Set the value indicating whether VM is powered on. + * + * @param poweredOn the poweredOn value to set + * @return the VMwareVirtualMachineDetails object itself. + */ + public VMwareVirtualMachineDetails withPoweredOn(String poweredOn) { + this.poweredOn = poweredOn; + return this; + } + + /** + * Get the VCenter infrastructure Id. + * + * @return the vCenterInfrastructureId value + */ + public String vCenterInfrastructureId() { + return this.vCenterInfrastructureId; + } + + /** + * Set the VCenter infrastructure Id. + * + * @param vCenterInfrastructureId the vCenterInfrastructureId value to set + * @return the VMwareVirtualMachineDetails object itself. + */ + public VMwareVirtualMachineDetails withVCenterInfrastructureId(String vCenterInfrastructureId) { + this.vCenterInfrastructureId = vCenterInfrastructureId; + return this; + } + + /** + * Get a value inidicating the discovery type of the machine. Value can be vCenter or physical. + * + * @return the discoveryType value + */ + public String discoveryType() { + return this.discoveryType; + } + + /** + * Set a value inidicating the discovery type of the machine. Value can be vCenter or physical. + * + * @param discoveryType the discoveryType value to set + * @return the VMwareVirtualMachineDetails object itself. + */ + public VMwareVirtualMachineDetails withDiscoveryType(String discoveryType) { + this.discoveryType = discoveryType; + return this; + } + + /** + * Get the disk details. + * + * @return the diskDetails value + */ + public List diskDetails() { + return this.diskDetails; + } + + /** + * Set the disk details. + * + * @param diskDetails the diskDetails value to set + * @return the VMwareVirtualMachineDetails object itself. + */ + public VMwareVirtualMachineDetails withDiskDetails(List diskDetails) { + this.diskDetails = diskDetails; + return this; + } + + /** + * Get the validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + + /** + * Set the validation errors. + * + * @param validationErrors the validationErrors value to set + * @return the VMwareVirtualMachineDetails object itself. + */ + public VMwareVirtualMachineDetails withValidationErrors(List validationErrors) { + this.validationErrors = validationErrors; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VaultHealthDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VaultHealthDetails.java new file mode 100644 index 0000000000000..9795c03df4da5 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VaultHealthDetails.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.RecoveryServicesManager; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation.VaultHealthDetailsInner; + +/** + * Type representing VaultHealthDetails. + */ +public interface VaultHealthDetails extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + VaultHealthProperties properties(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VaultHealthProperties.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VaultHealthProperties.java new file mode 100644 index 0000000000000..9d352ab5e5c29 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VaultHealthProperties.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.recoveryservicessiterecovery.v2018_01_10; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * class to define the health summary of the Vault. + */ +public class VaultHealthProperties { + /** + * The list of errors on the vault. + */ + @JsonProperty(value = "vaultErrors") + private List vaultErrors; + + /** + * The list of the health detail of the protected items in the vault. + */ + @JsonProperty(value = "protectedItemsHealth") + private ResourceHealthSummary protectedItemsHealth; + + /** + * The list of the health detail of the fabrics in the vault. + */ + @JsonProperty(value = "fabricsHealth") + private ResourceHealthSummary fabricsHealth; + + /** + * Get the list of errors on the vault. + * + * @return the vaultErrors value + */ + public List vaultErrors() { + return this.vaultErrors; + } + + /** + * Set the list of errors on the vault. + * + * @param vaultErrors the vaultErrors value to set + * @return the VaultHealthProperties object itself. + */ + public VaultHealthProperties withVaultErrors(List vaultErrors) { + this.vaultErrors = vaultErrors; + return this; + } + + /** + * Get the list of the health detail of the protected items in the vault. + * + * @return the protectedItemsHealth value + */ + public ResourceHealthSummary protectedItemsHealth() { + return this.protectedItemsHealth; + } + + /** + * Set the list of the health detail of the protected items in the vault. + * + * @param protectedItemsHealth the protectedItemsHealth value to set + * @return the VaultHealthProperties object itself. + */ + public VaultHealthProperties withProtectedItemsHealth(ResourceHealthSummary protectedItemsHealth) { + this.protectedItemsHealth = protectedItemsHealth; + return this; + } + + /** + * Get the list of the health detail of the fabrics in the vault. + * + * @return the fabricsHealth value + */ + public ResourceHealthSummary fabricsHealth() { + return this.fabricsHealth; + } + + /** + * Set the list of the health detail of the fabrics in the vault. + * + * @param fabricsHealth the fabricsHealth value to set + * @return the VaultHealthProperties object itself. + */ + public VaultHealthProperties withFabricsHealth(ResourceHealthSummary fabricsHealth) { + this.fabricsHealth = fabricsHealth; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VirtualMachineTaskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VirtualMachineTaskDetails.java new file mode 100644 index 0000000000000..ed5f43515c151 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VirtualMachineTaskDetails.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * This class represents the virtual machine task details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("VirtualMachineTaskDetails") +public class VirtualMachineTaskDetails extends TaskTypeDetails { + /** + * The skipped reason. + */ + @JsonProperty(value = "skippedReason") + private String skippedReason; + + /** + * The skipped reason string. + */ + @JsonProperty(value = "skippedReasonString") + private String skippedReasonString; + + /** + * The job entity. + */ + @JsonProperty(value = "jobTask") + private JobEntity jobTask; + + /** + * Get the skipped reason. + * + * @return the skippedReason value + */ + public String skippedReason() { + return this.skippedReason; + } + + /** + * Set the skipped reason. + * + * @param skippedReason the skippedReason value to set + * @return the VirtualMachineTaskDetails object itself. + */ + public VirtualMachineTaskDetails withSkippedReason(String skippedReason) { + this.skippedReason = skippedReason; + return this; + } + + /** + * Get the skipped reason string. + * + * @return the skippedReasonString value + */ + public String skippedReasonString() { + return this.skippedReasonString; + } + + /** + * Set the skipped reason string. + * + * @param skippedReasonString the skippedReasonString value to set + * @return the VirtualMachineTaskDetails object itself. + */ + public VirtualMachineTaskDetails withSkippedReasonString(String skippedReasonString) { + this.skippedReasonString = skippedReasonString; + return this; + } + + /** + * Get the job entity. + * + * @return the jobTask value + */ + public JobEntity jobTask() { + return this.jobTask; + } + + /** + * Set the job entity. + * + * @param jobTask the jobTask value to set + * @return the VirtualMachineTaskDetails object itself. + */ + public VirtualMachineTaskDetails withJobTask(JobEntity jobTask) { + this.jobTask = jobTask; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmNicUpdatesTaskDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmNicUpdatesTaskDetails.java new file mode 100644 index 0000000000000..844427489ae0f --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmNicUpdatesTaskDetails.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * This class represents the vm NicUpdates task details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("VmNicUpdatesTaskDetails") +public class VmNicUpdatesTaskDetails extends TaskTypeDetails { + /** + * Virtual machine Id. + */ + @JsonProperty(value = "vmId") + private String vmId; + + /** + * Nic Id. + */ + @JsonProperty(value = "nicId") + private String nicId; + + /** + * Name of the Nic. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Get virtual machine Id. + * + * @return the vmId value + */ + public String vmId() { + return this.vmId; + } + + /** + * Set virtual machine Id. + * + * @param vmId the vmId value to set + * @return the VmNicUpdatesTaskDetails object itself. + */ + public VmNicUpdatesTaskDetails withVmId(String vmId) { + this.vmId = vmId; + return this; + } + + /** + * Get nic Id. + * + * @return the nicId value + */ + public String nicId() { + return this.nicId; + } + + /** + * Set nic Id. + * + * @param nicId the nicId value to set + * @return the VmNicUpdatesTaskDetails object itself. + */ + public VmNicUpdatesTaskDetails withNicId(String nicId) { + this.nicId = nicId; + return this; + } + + /** + * Get name of the Nic. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the Nic. + * + * @param name the name value to set + * @return the VmNicUpdatesTaskDetails object itself. + */ + public VmNicUpdatesTaskDetails withName(String name) { + this.name = name; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmDetails.java new file mode 100644 index 0000000000000..80de3f11a9114 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmDetails.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * VMM fabric specific details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("VMM") +public class VmmDetails extends FabricSpecificDetails { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToAzureCreateNetworkMappingInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToAzureCreateNetworkMappingInput.java new file mode 100644 index 0000000000000..7134dbc10ba2b --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToAzureCreateNetworkMappingInput.java @@ -0,0 +1,21 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Create network mappings input properties/behaviour specific to Vmm to Azure + * Network mapping. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("VmmToAzure") +public class VmmToAzureCreateNetworkMappingInput extends FabricSpecificCreateNetworkMappingInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToAzureNetworkMappingSettings.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToAzureNetworkMappingSettings.java new file mode 100644 index 0000000000000..ea0f56abc4b21 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToAzureNetworkMappingSettings.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * E2A Network Mapping fabric specific settings. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("VmmToAzure") +public class VmmToAzureNetworkMappingSettings extends NetworkMappingFabricSpecificSettings { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToAzureUpdateNetworkMappingInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToAzureUpdateNetworkMappingInput.java new file mode 100644 index 0000000000000..826f66a65e407 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToAzureUpdateNetworkMappingInput.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Update network mappings input properties/behaviour specific to vmm to azure. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("VmmToAzure") +public class VmmToAzureUpdateNetworkMappingInput extends FabricSpecificUpdateNetworkMappingInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToVmmCreateNetworkMappingInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToVmmCreateNetworkMappingInput.java new file mode 100644 index 0000000000000..2c3ce4e659aa8 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToVmmCreateNetworkMappingInput.java @@ -0,0 +1,21 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Create network mappings input properties/behaviour specific to vmm to vmm + * Network mapping. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("VmmToVmm") +public class VmmToVmmCreateNetworkMappingInput extends FabricSpecificCreateNetworkMappingInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToVmmNetworkMappingSettings.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToVmmNetworkMappingSettings.java new file mode 100644 index 0000000000000..e46a5ea81641c --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToVmmNetworkMappingSettings.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * E2E Network Mapping fabric specific settings. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("VmmToVmm") +public class VmmToVmmNetworkMappingSettings extends NetworkMappingFabricSpecificSettings { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToVmmUpdateNetworkMappingInput.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToVmmUpdateNetworkMappingInput.java new file mode 100644 index 0000000000000..1942831a72e70 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmmToVmmUpdateNetworkMappingInput.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Update network mappings input properties/behaviour specific to vmm to vmm. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("VmmToVmm") +public class VmmToVmmUpdateNetworkMappingInput extends FabricSpecificUpdateNetworkMappingInput { +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmwareCbtPolicyDetails.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmwareCbtPolicyDetails.java new file mode 100644 index 0000000000000..00cf4df5faaf7 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/VmwareCbtPolicyDetails.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * VMware Cbt specific policy details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") +@JsonTypeName("VMwareCbt") +public class VmwareCbtPolicyDetails extends PolicyProviderSpecificDetails { + /** + * The recovery point threshold in minutes. + */ + @JsonProperty(value = "recoveryPointThresholdInMinutes") + private Integer recoveryPointThresholdInMinutes; + + /** + * The duration in minutes until which the recovery points need to be + * stored. + */ + @JsonProperty(value = "recoveryPointHistory") + private Integer recoveryPointHistory; + + /** + * The app consistent snapshot frequency in minutes. + */ + @JsonProperty(value = "appConsistentFrequencyInMinutes") + private Integer appConsistentFrequencyInMinutes; + + /** + * The crash consistent snapshot frequency in minutes. + */ + @JsonProperty(value = "crashConsistentFrequencyInMinutes") + private Integer crashConsistentFrequencyInMinutes; + + /** + * Get the recovery point threshold in minutes. + * + * @return the recoveryPointThresholdInMinutes value + */ + public Integer recoveryPointThresholdInMinutes() { + return this.recoveryPointThresholdInMinutes; + } + + /** + * Set the recovery point threshold in minutes. + * + * @param recoveryPointThresholdInMinutes the recoveryPointThresholdInMinutes value to set + * @return the VmwareCbtPolicyDetails object itself. + */ + public VmwareCbtPolicyDetails withRecoveryPointThresholdInMinutes(Integer recoveryPointThresholdInMinutes) { + this.recoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + return this; + } + + /** + * Get the duration in minutes until which the recovery points need to be stored. + * + * @return the recoveryPointHistory value + */ + public Integer recoveryPointHistory() { + return this.recoveryPointHistory; + } + + /** + * Set the duration in minutes until which the recovery points need to be stored. + * + * @param recoveryPointHistory the recoveryPointHistory value to set + * @return the VmwareCbtPolicyDetails object itself. + */ + public VmwareCbtPolicyDetails withRecoveryPointHistory(Integer recoveryPointHistory) { + this.recoveryPointHistory = recoveryPointHistory; + return this; + } + + /** + * Get the app consistent snapshot frequency in minutes. + * + * @return the appConsistentFrequencyInMinutes value + */ + public Integer appConsistentFrequencyInMinutes() { + return this.appConsistentFrequencyInMinutes; + } + + /** + * Set the app consistent snapshot frequency in minutes. + * + * @param appConsistentFrequencyInMinutes the appConsistentFrequencyInMinutes value to set + * @return the VmwareCbtPolicyDetails object itself. + */ + public VmwareCbtPolicyDetails withAppConsistentFrequencyInMinutes(Integer appConsistentFrequencyInMinutes) { + this.appConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + return this; + } + + /** + * Get the crash consistent snapshot frequency in minutes. + * + * @return the crashConsistentFrequencyInMinutes value + */ + public Integer crashConsistentFrequencyInMinutes() { + return this.crashConsistentFrequencyInMinutes; + } + + /** + * Set the crash consistent snapshot frequency in minutes. + * + * @param crashConsistentFrequencyInMinutes the crashConsistentFrequencyInMinutes value to set + * @return the VmwareCbtPolicyDetails object itself. + */ + public VmwareCbtPolicyDetails withCrashConsistentFrequencyInMinutes(Integer crashConsistentFrequencyInMinutes) { + this.crashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/AlertImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/AlertImpl.java new file mode 100644 index 0000000000000..ad56ddb142747 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/AlertImpl.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.Alert; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.AlertProperties; + +class AlertImpl extends CreatableUpdatableImpl implements Alert, Alert.Definition, Alert.Update { + private final RecoveryServicesManager manager; + private String alertSettingName; + + AlertImpl(String name, RecoveryServicesManager manager) { + super(name, new AlertInner()); + this.manager = manager; + // Set resource name + this.alertSettingName = name; + // + } + + AlertImpl(AlertInner inner, RecoveryServicesManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.alertSettingName = inner.name(); + // resource ancestor names + this.alertSettingName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationAlertSettings"); + // + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ReplicationAlertSettingsInner client = this.manager().inner().replicationAlertSettings(); + return client.createAsync(this.alertSettingName) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ReplicationAlertSettingsInner client = this.manager().inner().replicationAlertSettings(); + return client.createAsync(this.alertSettingName) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ReplicationAlertSettingsInner client = this.manager().inner().replicationAlertSettings(); + return client.getAsync(this.alertSettingName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public AlertProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public AlertImpl withExistingVault() { + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/AlertInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/AlertInner.java new file mode 100644 index 0000000000000..0beee2a4c69a8 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/AlertInner.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.AlertProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Implements the Alert class. + */ +public class AlertInner extends ProxyResource { + /** + * Alert related data. + */ + @JsonProperty(value = "properties") + private AlertProperties properties; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get alert related data. + * + * @return the properties value + */ + public AlertProperties properties() { + return this.properties; + } + + /** + * Set alert related data. + * + * @param properties the properties value to set + * @return the AlertInner object itself. + */ + public AlertInner withProperties(AlertProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the AlertInner object itself. + */ + public AlertInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/EventImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/EventImpl.java new file mode 100644 index 0000000000000..269728e00efca --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/EventImpl.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.Event; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.EventProperties; + +class EventImpl extends IndexableRefreshableWrapperImpl implements Event { + private final RecoveryServicesManager manager; + private String eventName; + + EventImpl(EventInner inner, RecoveryServicesManager manager) { + super(null, inner); + this.manager = manager; + this.eventName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationEvents"); + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + ReplicationEventsInner client = this.manager().inner().replicationEvents(); + return client.getAsync(this.eventName); + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public EventProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/EventInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/EventInner.java new file mode 100644 index 0000000000000..708a582bf079e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/EventInner.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.EventProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Implements the Event class. + */ +public class EventInner extends ProxyResource { + /** + * Event related data. + */ + @JsonProperty(value = "properties") + private EventProperties properties; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get event related data. + * + * @return the properties value + */ + public EventProperties properties() { + return this.properties; + } + + /** + * Set event related data. + * + * @param properties the properties value to set + * @return the EventInner object itself. + */ + public EventInner withProperties(EventProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the EventInner object itself. + */ + public EventInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/FabricImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/FabricImpl.java new file mode 100644 index 0000000000000..4f5e800bf48a5 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/FabricImpl.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.Fabric; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.FabricProperties; + +class FabricImpl extends CreatableUpdatableImpl implements Fabric, Fabric.Definition, Fabric.Update { + private final RecoveryServicesManager manager; + private String fabricName; + + FabricImpl(String name, RecoveryServicesManager manager) { + super(name, new FabricInner()); + this.manager = manager; + // Set resource name + this.fabricName = name; + // + } + + FabricImpl(FabricInner inner, RecoveryServicesManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.fabricName = inner.name(); + // resource ancestor names + this.fabricName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationFabrics"); + // + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ReplicationFabricsInner client = this.manager().inner().replicationFabrics(); + return client.createAsync(this.fabricName) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ReplicationFabricsInner client = this.manager().inner().replicationFabrics(); + return client.createAsync(this.fabricName) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ReplicationFabricsInner client = this.manager().inner().replicationFabrics(); + return client.getAsync(this.fabricName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public FabricProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public FabricImpl withExistingVault() { + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/FabricInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/FabricInner.java new file mode 100644 index 0000000000000..5064a1093bc12 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/FabricInner.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.FabricProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Fabric definition. + */ +public class FabricInner extends ProxyResource { + /** + * Fabric related data. + */ + @JsonProperty(value = "properties") + private FabricProperties properties; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get fabric related data. + * + * @return the properties value + */ + public FabricProperties properties() { + return this.properties; + } + + /** + * Set fabric related data. + * + * @param properties the properties value to set + * @return the FabricInner object itself. + */ + public FabricInner withProperties(FabricProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the FabricInner object itself. + */ + public FabricInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/IdParsingUtils.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/IdParsingUtils.java new file mode 100644 index 0000000000000..f294501d0c2d1 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/IdParsingUtils.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; +import java.util.Arrays; +import java.util.Iterator; + +class IdParsingUtils { + public static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + public static String getValueFromIdByPosition(String id, int pos) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + int index = 0; + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (index == pos) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + index++; + } + return null; + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/JobImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/JobImpl.java new file mode 100644 index 0000000000000..185fa0a9e7718 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/JobImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.Job; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ARMException; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.JobProperties; + +class JobImpl extends IndexableRefreshableWrapperImpl implements Job { + private final RecoveryServicesManager manager; + private String jobName; + + JobImpl(JobInner inner, RecoveryServicesManager manager) { + super(null, inner); + this.manager = manager; + this.jobName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationJobs"); + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + ReplicationJobsInner client = this.manager().inner().replicationJobs(); + return client.getAsync(this.jobName); + } + + + + @Override + public String endTime() { + return this.inner().endTime(); + } + + @Override + public ARMException error() { + return this.inner().error(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public JobProperties properties() { + return this.inner().properties(); + } + + @Override + public String startTime() { + return this.inner().startTime(); + } + + @Override + public String status() { + return this.inner().status(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/JobInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/JobInner.java new file mode 100644 index 0000000000000..e44fba93c6a35 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/JobInner.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.JobProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ARMException; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Job details. + */ +public class JobInner extends ProxyResource { + /** + * The custom data. + */ + @JsonProperty(value = "properties") + private JobProperties properties; + + /** + * The status of the Job. ARM expects the terminal status to be one of (1) + * Succeeded, (2) Failed or (3) Canceled. All other values imply that the + * operation is still running / being applied. + */ + @JsonProperty(value = "status") + private String status; + + /** + * The error. + */ + @JsonProperty(value = "error") + private ARMException error; + + /** + * The start time. + */ + @JsonProperty(value = "startTime") + private String startTime; + + /** + * The start time. + */ + @JsonProperty(value = "endTime") + private String endTime; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get the custom data. + * + * @return the properties value + */ + public JobProperties properties() { + return this.properties; + } + + /** + * Set the custom data. + * + * @param properties the properties value to set + * @return the JobInner object itself. + */ + public JobInner withProperties(JobProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the status of the Job. ARM expects the terminal status to be one of (1) Succeeded, (2) Failed or (3) Canceled. All other values imply that the operation is still running / being applied. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Set the status of the Job. ARM expects the terminal status to be one of (1) Succeeded, (2) Failed or (3) Canceled. All other values imply that the operation is still running / being applied. + * + * @param status the status value to set + * @return the JobInner object itself. + */ + public JobInner withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the error. + * + * @return the error value + */ + public ARMException error() { + return this.error; + } + + /** + * Set the error. + * + * @param error the error value to set + * @return the JobInner object itself. + */ + public JobInner withError(ARMException error) { + this.error = error; + return this; + } + + /** + * Get the start time. + * + * @return the startTime value + */ + public String startTime() { + return this.startTime; + } + + /** + * Set the start time. + * + * @param startTime the startTime value to set + * @return the JobInner object itself. + */ + public JobInner withStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the start time. + * + * @return the endTime value + */ + public String endTime() { + return this.endTime; + } + + /** + * Set the start time. + * + * @param endTime the endTime value to set + * @return the JobInner object itself. + */ + public JobInner withEndTime(String endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the JobInner object itself. + */ + public JobInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/LogicalNetworkImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/LogicalNetworkImpl.java new file mode 100644 index 0000000000000..df7f2dbeaa2c4 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/LogicalNetworkImpl.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.LogicalNetwork; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.LogicalNetworkProperties; + +class LogicalNetworkImpl extends IndexableRefreshableWrapperImpl implements LogicalNetwork { + private final RecoveryServicesManager manager; + private String fabricName; + private String logicalNetworkName; + + LogicalNetworkImpl(LogicalNetworkInner inner, RecoveryServicesManager manager) { + super(null, inner); + this.manager = manager; + this.fabricName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationFabrics"); + this.logicalNetworkName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationLogicalNetworks"); + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + ReplicationLogicalNetworksInner client = this.manager().inner().replicationLogicalNetworks(); + return client.getAsync(this.fabricName, this.logicalNetworkName); + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public LogicalNetworkProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/LogicalNetworkInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/LogicalNetworkInner.java new file mode 100644 index 0000000000000..93a81149d0b43 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/LogicalNetworkInner.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.LogicalNetworkProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Logical network data model. + */ +public class LogicalNetworkInner extends ProxyResource { + /** + * The Logical Network Properties. + */ + @JsonProperty(value = "properties") + private LogicalNetworkProperties properties; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get the Logical Network Properties. + * + * @return the properties value + */ + public LogicalNetworkProperties properties() { + return this.properties; + } + + /** + * Set the Logical Network Properties. + * + * @param properties the properties value to set + * @return the LogicalNetworkInner object itself. + */ + public LogicalNetworkInner withProperties(LogicalNetworkProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the LogicalNetworkInner object itself. + */ + public LogicalNetworkInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/NetworkImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/NetworkImpl.java new file mode 100644 index 0000000000000..a4d428bbc604c --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/NetworkImpl.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.Network; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.NetworkProperties; + +class NetworkImpl extends WrapperImpl implements Network { + private final RecoveryServicesManager manager; + + NetworkImpl(NetworkInner inner, RecoveryServicesManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public NetworkProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/NetworkInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/NetworkInner.java new file mode 100644 index 0000000000000..59151a6c0d2bc --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/NetworkInner.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.NetworkProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Network model. + */ +public class NetworkInner extends ProxyResource { + /** + * The Network Properties. + */ + @JsonProperty(value = "properties") + private NetworkProperties properties; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get the Network Properties. + * + * @return the properties value + */ + public NetworkProperties properties() { + return this.properties; + } + + /** + * Set the Network Properties. + * + * @param properties the properties value to set + * @return the NetworkInner object itself. + */ + public NetworkInner withProperties(NetworkProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the NetworkInner object itself. + */ + public NetworkInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/NetworkMappingImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/NetworkMappingImpl.java new file mode 100644 index 0000000000000..cb289ecdeb97e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/NetworkMappingImpl.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.NetworkMapping; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.NetworkMappingProperties; + +class NetworkMappingImpl extends CreatableUpdatableImpl implements NetworkMapping, NetworkMapping.Definition, NetworkMapping.Update { + private final RecoveryServicesManager manager; + private String fabricName; + private String networkName; + private String networkMappingName; + + NetworkMappingImpl(String name, RecoveryServicesManager manager) { + super(name, new NetworkMappingInner()); + this.manager = manager; + // Set resource name + this.networkMappingName = name; + // + } + + NetworkMappingImpl(NetworkMappingInner inner, RecoveryServicesManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.networkMappingName = inner.name(); + // resource ancestor names + this.fabricName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationFabrics"); + this.networkName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationNetworks"); + this.networkMappingName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationNetworkMappings"); + // + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ReplicationNetworkMappingsInner client = this.manager().inner().replicationNetworkMappings(); + return client.createAsync(this.fabricName, this.networkName, this.networkMappingName) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ReplicationNetworkMappingsInner client = this.manager().inner().replicationNetworkMappings(); + return client.updateAsync(this.fabricName, this.networkName, this.networkMappingName) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ReplicationNetworkMappingsInner client = this.manager().inner().replicationNetworkMappings(); + return null; // NOP getInnerAsync implementation as get is not supported + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public NetworkMappingProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public NetworkMappingImpl withExistingVault(String fabricName, String networkName) { + this.fabricName = fabricName; + this.networkName = networkName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/NetworkMappingInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/NetworkMappingInner.java new file mode 100644 index 0000000000000..71fde0fc628ae --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/NetworkMappingInner.java @@ -0,0 +1,76 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.NetworkMappingProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Network Mapping model. Ideally it should have been possible to inherit this + * class from prev version in InheritedModels as long as there is no difference + * in structure or method signature. Since there were no base Models for + * certain fields and methods viz NetworkMappingProperties and Load with + * required return type, the class has been introduced in its entirety with + * references to base models to facilitate exensions in subsequent versions. + */ +public class NetworkMappingInner extends ProxyResource { + /** + * The Network Mapping Properties. + */ + @JsonProperty(value = "properties") + private NetworkMappingProperties properties; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get the Network Mapping Properties. + * + * @return the properties value + */ + public NetworkMappingProperties properties() { + return this.properties; + } + + /** + * Set the Network Mapping Properties. + * + * @param properties the properties value to set + * @return the NetworkMappingInner object itself. + */ + public NetworkMappingInner withProperties(NetworkMappingProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the NetworkMappingInner object itself. + */ + public NetworkMappingInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/OperationsDiscoveryImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/OperationsDiscoveryImpl.java new file mode 100644 index 0000000000000..3b043619515be --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/OperationsDiscoveryImpl.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.OperationsDiscovery; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.Display; + +class OperationsDiscoveryImpl extends WrapperImpl implements OperationsDiscovery { + private final RecoveryServicesManager manager; + + OperationsDiscoveryImpl(OperationsDiscoveryInner inner, RecoveryServicesManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + + + @Override + public Display display() { + return this.inner().display(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String origin() { + return this.inner().origin(); + } + + @Override + public Object properties() { + return this.inner().properties(); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/OperationsDiscoveryInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/OperationsDiscoveryInner.java new file mode 100644 index 0000000000000..7afc8092141c5 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/OperationsDiscoveryInner.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.Display; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Operations discovery class. + */ +public class OperationsDiscoveryInner { + /** + * Name of the API. The name of the operation being performed on this + * particular object. It should match the action name that appears in RBAC + * / the event service. Examples of operations include: * + * Microsoft.Compute/virtualMachine/capture/action * + * Microsoft.Compute/virtualMachine/restart/action * + * Microsoft.Compute/virtualMachine/write * + * Microsoft.Compute/virtualMachine/read * + * Microsoft.Compute/virtualMachine/delete Each action should include, in + * order: (1) Resource Provider Namespace (2) Type hierarchy for which the + * action applies (e.g. server/databases for a SQL Azure database) (3) + * Read, Write, Action or Delete indicating which type applies. If it is a + * PUT/PATCH on a collection or named value, Write should be used. If it is + * a GET, Read should be used. If it is a DELETE, Delete should be used. If + * it is a POST, Action should be used. As a note: all resource providers + * would need to include the "{Resource Provider + * Namespace}/register/action" operation in their response. This API is + * used to register for their service, and should include details about the + * operation (e.g. a localized name for the resource provider + any special + * considerations like PII release). + */ + @JsonProperty(value = "name") + private String name; + + /** + * Object type. + */ + @JsonProperty(value = "display") + private Display display; + + /** + * Origin. The intended executor of the operation; governs the display of + * the operation in the RBAC UX and the audit logs UX. Default value is + * "user,system". + */ + @JsonProperty(value = "origin") + private String origin; + + /** + * Properties. Reserved for future use. + */ + @JsonProperty(value = "properties") + private Object properties; + + /** + * Get name of the API. The name of the operation being performed on this particular object. It should match the action name that appears in RBAC / the event service. Examples of operations include: * Microsoft.Compute/virtualMachine/capture/action * Microsoft.Compute/virtualMachine/restart/action * Microsoft.Compute/virtualMachine/write * Microsoft.Compute/virtualMachine/read * Microsoft.Compute/virtualMachine/delete Each action should include, in order: (1) Resource Provider Namespace (2) Type hierarchy for which the action applies (e.g. server/databases for a SQL Azure database) (3) Read, Write, Action or Delete indicating which type applies. If it is a PUT/PATCH on a collection or named value, Write should be used. If it is a GET, Read should be used. If it is a DELETE, Delete should be used. If it is a POST, Action should be used. As a note: all resource providers would need to include the "{Resource Provider Namespace}/register/action" operation in their response. This API is used to register for their service, and should include details about the operation (e.g. a localized name for the resource provider + any special considerations like PII release). + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the API. The name of the operation being performed on this particular object. It should match the action name that appears in RBAC / the event service. Examples of operations include: * Microsoft.Compute/virtualMachine/capture/action * Microsoft.Compute/virtualMachine/restart/action * Microsoft.Compute/virtualMachine/write * Microsoft.Compute/virtualMachine/read * Microsoft.Compute/virtualMachine/delete Each action should include, in order: (1) Resource Provider Namespace (2) Type hierarchy for which the action applies (e.g. server/databases for a SQL Azure database) (3) Read, Write, Action or Delete indicating which type applies. If it is a PUT/PATCH on a collection or named value, Write should be used. If it is a GET, Read should be used. If it is a DELETE, Delete should be used. If it is a POST, Action should be used. As a note: all resource providers would need to include the "{Resource Provider Namespace}/register/action" operation in their response. This API is used to register for their service, and should include details about the operation (e.g. a localized name for the resource provider + any special considerations like PII release). + * + * @param name the name value to set + * @return the OperationsDiscoveryInner object itself. + */ + public OperationsDiscoveryInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get object type. + * + * @return the display value + */ + public Display display() { + return this.display; + } + + /** + * Set object type. + * + * @param display the display value to set + * @return the OperationsDiscoveryInner object itself. + */ + public OperationsDiscoveryInner withDisplay(Display display) { + this.display = display; + return this; + } + + /** + * Get origin. The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs UX. Default value is "user,system". + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Set origin. The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs UX. Default value is "user,system". + * + * @param origin the origin value to set + * @return the OperationsDiscoveryInner object itself. + */ + public OperationsDiscoveryInner withOrigin(String origin) { + this.origin = origin; + return this; + } + + /** + * Get properties. Reserved for future use. + * + * @return the properties value + */ + public Object properties() { + return this.properties; + } + + /** + * Set properties. Reserved for future use. + * + * @param properties the properties value to set + * @return the OperationsDiscoveryInner object itself. + */ + public OperationsDiscoveryInner withProperties(Object properties) { + this.properties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/OperationsImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/OperationsImpl.java new file mode 100644 index 0000000000000..77a8a35e17409 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/OperationsImpl.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * jkl + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.Operations; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import com.microsoft.azure.arm.utils.PagedListConverter; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.OperationsDiscovery; + +class OperationsImpl extends WrapperImpl implements Operations { + private PagedListConverter converter; + private final RecoveryServicesManager manager; + + OperationsImpl(RecoveryServicesManager manager) { + super(manager.inner().operations()); + this.manager = manager; + this.converter = new PagedListConverter() { + @Override + public Observable typeConvertAsync(OperationsDiscoveryInner inner) { + return Observable.just((OperationsDiscovery) wrapModel(inner)); + } + }; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + private OperationsDiscoveryImpl wrapModel(OperationsDiscoveryInner inner) { + return new OperationsDiscoveryImpl(inner, manager()); + } + + @Override + public PagedList list() { + OperationsInner client = this.inner(); + return converter.convert(client.listByResourceGroup()); + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listByResourceGroupAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public OperationsDiscovery call(OperationsDiscoveryInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/OperationsInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/OperationsInner.java new file mode 100644 index 0000000000000..4468050239079 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/OperationsInner.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.recoveryservicessiterecovery.v2018_01_10.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 Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl 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, SiteRecoveryManagementClientImpl 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.recoveryservicessiterecovery.v2018_01_10.Operations listByResourceGroup" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/operations") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.Operations listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Returns the list of available operations. + * Operation to return the list of available 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<OperationsDiscoveryInner> object if successful. + */ + public PagedList listByResourceGroup() { + ServiceResponse> response = listByResourceGroupSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns the list of available operations. + * Operation to return the list of available 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> listByResourceGroupAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns the list of available operations. + * Operation to return the list of available operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationsDiscoveryInner> object + */ + public Observable> listByResourceGroupAsync() { + return listByResourceGroupWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns the list of available operations. + * Operation to return the list of available operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationsDiscoveryInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync() { + return listByResourceGroupSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns the list of available operations. + * Operation to return the list of available operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationsDiscoveryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync() { + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns the list of available operations. + * Operation to return the list of available 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<OperationsDiscoveryInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns the list of available operations. + * Operation to return the list of available 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> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns the list of available operations. + * Operation to return the list of available 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<OperationsDiscoveryInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns the list of available operations. + * Operation to return the list of available 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<OperationsDiscoveryInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns the list of available operations. + * Operation to return the list of available 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<OperationsDiscoveryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/PageImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/PageImpl.java new file mode 100644 index 0000000000000..325de4e7f5108 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/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.recoveryservicessiterecovery.v2018_01_10.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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/PolicyImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/PolicyImpl.java new file mode 100644 index 0000000000000..0e6cdc6222b2e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/PolicyImpl.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.Policy; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.PolicyProperties; + +class PolicyImpl extends CreatableUpdatableImpl implements Policy, Policy.Definition, Policy.Update { + private final RecoveryServicesManager manager; + private String policyName; + + PolicyImpl(String name, RecoveryServicesManager manager) { + super(name, new PolicyInner()); + this.manager = manager; + // Set resource name + this.policyName = name; + // + } + + PolicyImpl(PolicyInner inner, RecoveryServicesManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.policyName = inner.name(); + // resource ancestor names + this.policyName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationPolicies"); + // + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ReplicationPoliciesInner client = this.manager().inner().replicationPolicies(); + return client.createAsync(this.policyName) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ReplicationPoliciesInner client = this.manager().inner().replicationPolicies(); + return client.updateAsync(this.policyName) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ReplicationPoliciesInner client = this.manager().inner().replicationPolicies(); + return client.getAsync(this.policyName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public PolicyProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public PolicyImpl withExistingVault() { + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/PolicyInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/PolicyInner.java new file mode 100644 index 0000000000000..45e1e7b10d83b --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/PolicyInner.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.PolicyProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Protection profile details. + */ +public class PolicyInner extends ProxyResource { + /** + * The custom data. + */ + @JsonProperty(value = "properties") + private PolicyProperties properties; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get the custom data. + * + * @return the properties value + */ + public PolicyProperties properties() { + return this.properties; + } + + /** + * Set the custom data. + * + * @param properties the properties value to set + * @return the PolicyInner object itself. + */ + public PolicyInner withProperties(PolicyProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the PolicyInner object itself. + */ + public PolicyInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectableItemImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectableItemImpl.java new file mode 100644 index 0000000000000..ba6b3dc798a06 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectableItemImpl.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ProtectableItem; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ProtectableItemProperties; + +class ProtectableItemImpl extends IndexableRefreshableWrapperImpl implements ProtectableItem { + private final RecoveryServicesManager manager; + private String fabricName; + private String protectionContainerName; + private String protectableItemName; + + ProtectableItemImpl(ProtectableItemInner inner, RecoveryServicesManager manager) { + super(null, inner); + this.manager = manager; + this.fabricName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationFabrics"); + this.protectionContainerName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationProtectionContainers"); + this.protectableItemName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationProtectableItems"); + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + ReplicationProtectableItemsInner client = this.manager().inner().replicationProtectableItems(); + return client.getAsync(this.fabricName, this.protectionContainerName, this.protectableItemName); + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProtectableItemProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectableItemInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectableItemInner.java new file mode 100644 index 0000000000000..7c679e170d185 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectableItemInner.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ProtectableItemProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Replication protected item. + */ +public class ProtectableItemInner extends ProxyResource { + /** + * The custom data. + */ + @JsonProperty(value = "properties") + private ProtectableItemProperties properties; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get the custom data. + * + * @return the properties value + */ + public ProtectableItemProperties properties() { + return this.properties; + } + + /** + * Set the custom data. + * + * @param properties the properties value to set + * @return the ProtectableItemInner object itself. + */ + public ProtectableItemInner withProperties(ProtectableItemProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the ProtectableItemInner object itself. + */ + public ProtectableItemInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectionContainerImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectionContainerImpl.java new file mode 100644 index 0000000000000..bf5eebdb81853 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectionContainerImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ProtectionContainer; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ProtectionContainerProperties; + +class ProtectionContainerImpl extends CreatableUpdatableImpl implements ProtectionContainer, ProtectionContainer.Definition, ProtectionContainer.Update { + private final RecoveryServicesManager manager; + private String fabricName; + private String protectionContainerName; + + ProtectionContainerImpl(String name, RecoveryServicesManager manager) { + super(name, new ProtectionContainerInner()); + this.manager = manager; + // Set resource name + this.protectionContainerName = name; + // + } + + ProtectionContainerImpl(ProtectionContainerInner inner, RecoveryServicesManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.protectionContainerName = inner.name(); + // resource ancestor names + this.fabricName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationFabrics"); + this.protectionContainerName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationProtectionContainers"); + // + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ReplicationProtectionContainersInner client = this.manager().inner().replicationProtectionContainers(); + return client.createAsync(this.fabricName, this.protectionContainerName) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ReplicationProtectionContainersInner client = this.manager().inner().replicationProtectionContainers(); + return client.createAsync(this.fabricName, this.protectionContainerName) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ReplicationProtectionContainersInner client = this.manager().inner().replicationProtectionContainers(); + return client.getAsync(this.fabricName, this.protectionContainerName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProtectionContainerProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ProtectionContainerImpl withExistingReplicationFabric(String fabricName) { + this.fabricName = fabricName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectionContainerInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectionContainerInner.java new file mode 100644 index 0000000000000..fab3d4680e56e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectionContainerInner.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ProtectionContainerProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Protection container details. + */ +public class ProtectionContainerInner extends ProxyResource { + /** + * The custom data. + */ + @JsonProperty(value = "properties") + private ProtectionContainerProperties properties; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get the custom data. + * + * @return the properties value + */ + public ProtectionContainerProperties properties() { + return this.properties; + } + + /** + * Set the custom data. + * + * @param properties the properties value to set + * @return the ProtectionContainerInner object itself. + */ + public ProtectionContainerInner withProperties(ProtectionContainerProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the ProtectionContainerInner object itself. + */ + public ProtectionContainerInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectionContainerMappingImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectionContainerMappingImpl.java new file mode 100644 index 0000000000000..066ab91c0f53c --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectionContainerMappingImpl.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ProtectionContainerMapping; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ProtectionContainerMappingProperties; + +class ProtectionContainerMappingImpl extends CreatableUpdatableImpl implements ProtectionContainerMapping, ProtectionContainerMapping.Definition, ProtectionContainerMapping.Update { + private final RecoveryServicesManager manager; + private String fabricName; + private String protectionContainerName; + private String mappingName; + + ProtectionContainerMappingImpl(String name, RecoveryServicesManager manager) { + super(name, new ProtectionContainerMappingInner()); + this.manager = manager; + // Set resource name + this.mappingName = name; + // + } + + ProtectionContainerMappingImpl(ProtectionContainerMappingInner inner, RecoveryServicesManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.mappingName = inner.name(); + // resource ancestor names + this.fabricName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationFabrics"); + this.protectionContainerName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationProtectionContainers"); + this.mappingName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationProtectionContainerMappings"); + // + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ReplicationProtectionContainerMappingsInner client = this.manager().inner().replicationProtectionContainerMappings(); + return client.createAsync(this.fabricName, this.protectionContainerName, this.mappingName) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ReplicationProtectionContainerMappingsInner client = this.manager().inner().replicationProtectionContainerMappings(); + return client.createAsync(this.fabricName, this.protectionContainerName, this.mappingName) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ReplicationProtectionContainerMappingsInner client = this.manager().inner().replicationProtectionContainerMappings(); + return client.getAsync(this.fabricName, this.protectionContainerName, this.mappingName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProtectionContainerMappingProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ProtectionContainerMappingImpl withExistingReplicationProtectionContainer(String fabricName, String protectionContainerName) { + this.fabricName = fabricName; + this.protectionContainerName = protectionContainerName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectionContainerMappingInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectionContainerMappingInner.java new file mode 100644 index 0000000000000..6f453c55a9627 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ProtectionContainerMappingInner.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ProtectionContainerMappingProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Protection container mapping object. + */ +public class ProtectionContainerMappingInner extends ProxyResource { + /** + * The custom data. + */ + @JsonProperty(value = "properties") + private ProtectionContainerMappingProperties properties; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get the custom data. + * + * @return the properties value + */ + public ProtectionContainerMappingProperties properties() { + return this.properties; + } + + /** + * Set the custom data. + * + * @param properties the properties value to set + * @return the ProtectionContainerMappingInner object itself. + */ + public ProtectionContainerMappingInner withProperties(ProtectionContainerMappingProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the ProtectionContainerMappingInner object itself. + */ + public ProtectionContainerMappingInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPlanImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPlanImpl.java new file mode 100644 index 0000000000000..6d8cc67fe8652 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPlanImpl.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPlan; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.CreateRecoveryPlanInputProperties; +import java.util.List; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPlanProperties; +import rx.functions.Func1; + +class RecoveryPlanImpl extends CreatableUpdatableImpl implements RecoveryPlan, RecoveryPlan.Definition, RecoveryPlan.Update { + private final RecoveryServicesManager manager; + private String recoveryPlanName; + private CreateRecoveryPlanInputProperties cproperties; + + RecoveryPlanImpl(String name, RecoveryServicesManager manager) { + super(name, new RecoveryPlanInner()); + this.manager = manager; + // Set resource name + this.recoveryPlanName = name; + // + this.cproperties = new CreateRecoveryPlanInputProperties(); + } + + RecoveryPlanImpl(RecoveryPlanInner inner, RecoveryServicesManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.recoveryPlanName = inner.name(); + // resource ancestor names + this.recoveryPlanName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationRecoveryPlans"); + // + this.cproperties = new CreateRecoveryPlanInputProperties(); + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ReplicationRecoveryPlansInner client = this.manager().inner().replicationRecoveryPlans(); + return client.createAsync(this.recoveryPlanName, this.cproperties) + .map(new Func1() { + @Override + public RecoveryPlanInner call(RecoveryPlanInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ReplicationRecoveryPlansInner client = this.manager().inner().replicationRecoveryPlans(); + return client.updateAsync(this.recoveryPlanName) + .map(new Func1() { + @Override + public RecoveryPlanInner call(RecoveryPlanInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ReplicationRecoveryPlansInner client = this.manager().inner().replicationRecoveryPlans(); + return client.getAsync(this.recoveryPlanName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.cproperties = new CreateRecoveryPlanInputProperties(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public RecoveryPlanProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public RecoveryPlanImpl withExistingVault() { + return this; + } + + @Override + public RecoveryPlanImpl withProperties(CreateRecoveryPlanInputProperties properties) { + this.cproperties = properties; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPlanInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPlanInner.java new file mode 100644 index 0000000000000..566a4e6bd26b7 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPlanInner.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPlanProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Recovery plan details. + */ +public class RecoveryPlanInner extends ProxyResource { + /** + * The custom details. + */ + @JsonProperty(value = "properties") + private RecoveryPlanProperties properties; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get the custom details. + * + * @return the properties value + */ + public RecoveryPlanProperties properties() { + return this.properties; + } + + /** + * Set the custom details. + * + * @param properties the properties value to set + * @return the RecoveryPlanInner object itself. + */ + public RecoveryPlanInner withProperties(RecoveryPlanProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the RecoveryPlanInner object itself. + */ + public RecoveryPlanInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPointImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPointImpl.java new file mode 100644 index 0000000000000..341b5f9a92550 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPointImpl.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPoint; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPointProperties; + +class RecoveryPointImpl extends IndexableRefreshableWrapperImpl implements RecoveryPoint { + private final RecoveryServicesManager manager; + private String fabricName; + private String protectionContainerName; + private String replicatedProtectedItemName; + private String recoveryPointName; + + RecoveryPointImpl(RecoveryPointInner inner, RecoveryServicesManager manager) { + super(null, inner); + this.manager = manager; + this.fabricName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationFabrics"); + this.protectionContainerName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationProtectionContainers"); + this.replicatedProtectedItemName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationProtectedItems"); + this.recoveryPointName = IdParsingUtils.getValueFromIdByName(inner.id(), "recoveryPoints"); + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + RecoveryPointsInner client = this.manager().inner().recoveryPoints(); + return client.getAsync(this.fabricName, this.protectionContainerName, this.replicatedProtectedItemName, this.recoveryPointName); + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public RecoveryPointProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPointInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPointInner.java new file mode 100644 index 0000000000000..81a5fda4799b5 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPointInner.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPointProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Base class representing a recovery point. + */ +public class RecoveryPointInner extends ProxyResource { + /** + * Recovery point related data. + */ + @JsonProperty(value = "properties") + private RecoveryPointProperties properties; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get recovery point related data. + * + * @return the properties value + */ + public RecoveryPointProperties properties() { + return this.properties; + } + + /** + * Set recovery point related data. + * + * @param properties the properties value to set + * @return the RecoveryPointInner object itself. + */ + public RecoveryPointInner withProperties(RecoveryPointProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the RecoveryPointInner object itself. + */ + public RecoveryPointInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPointsImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPointsImpl.java new file mode 100644 index 0000000000000..a12610119e114 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPointsImpl.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPoints; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPoint; + +class RecoveryPointsImpl extends WrapperImpl implements RecoveryPoints { + private final RecoveryServicesManager manager; + + RecoveryPointsImpl(RecoveryServicesManager manager) { + super(manager.inner().recoveryPoints()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + private RecoveryPointImpl wrapModel(RecoveryPointInner inner) { + return new RecoveryPointImpl(inner, manager()); + } + + @Override + public Observable listByReplicationProtectedItemsAsync(final String fabricName, final String protectionContainerName, final String replicatedProtectedItemName) { + RecoveryPointsInner client = this.inner(); + return client.listByReplicationProtectedItemsAsync(fabricName, protectionContainerName, replicatedProtectedItemName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public RecoveryPoint call(RecoveryPointInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, String recoveryPointName) { + RecoveryPointsInner client = this.inner(); + return client.getAsync(fabricName, protectionContainerName, replicatedProtectedItemName, recoveryPointName) + .map(new Func1() { + @Override + public RecoveryPoint call(RecoveryPointInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPointsInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPointsInner.java new file mode 100644 index 0000000000000..0f427a0b5919b --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryPointsInner.java @@ -0,0 +1,442 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in RecoveryPoints. + */ +public class RecoveryPointsInner { + /** The Retrofit service to perform REST calls. */ + private RecoveryPointsService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of RecoveryPointsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public RecoveryPointsInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(RecoveryPointsService.class); + this.client = client; + } + + /** + * The interface defining all the services for RecoveryPoints to be + * used by Retrofit to perform actually REST calls. + */ + interface RecoveryPointsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPoints get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/recoveryPoints/{recoveryPointName}") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Path("recoveryPointName") String recoveryPointName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPoints listByReplicationProtectedItems" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/recoveryPoints") + Observable> listByReplicationProtectedItems(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPoints listByReplicationProtectedItemsNext" }) + @GET + Observable> listByReplicationProtectedItemsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get a recovery point. + * Get the details of specified recovery point. + * + * @param fabricName The fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replication protected item's name. + * @param recoveryPointName The recovery point 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 RecoveryPointInner object if successful. + */ + public RecoveryPointInner get(String fabricName, String protectionContainerName, String replicatedProtectedItemName, String recoveryPointName) { + return getWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, recoveryPointName).toBlocking().single().body(); + } + + /** + * Get a recovery point. + * Get the details of specified recovery point. + * + * @param fabricName The fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replication protected item's name. + * @param recoveryPointName The recovery point 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 getAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, String recoveryPointName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, recoveryPointName), serviceCallback); + } + + /** + * Get a recovery point. + * Get the details of specified recovery point. + * + * @param fabricName The fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replication protected item's name. + * @param recoveryPointName The recovery point name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPointInner object + */ + public Observable getAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, String recoveryPointName) { + return getWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, recoveryPointName).map(new Func1, RecoveryPointInner>() { + @Override + public RecoveryPointInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a recovery point. + * Get the details of specified recovery point. + * + * @param fabricName The fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replication protected item's name. + * @param recoveryPointName The recovery point name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPointInner object + */ + public Observable> getWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, String recoveryPointName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (recoveryPointName == null) { + throw new IllegalArgumentException("Parameter recoveryPointName is required 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(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, recoveryPointName, 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); + } + + /** + * Get recovery points for a replication protected item. + * Lists the available recovery points for a replication protected item. + * + * @param fabricName The fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replication protected item's 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<RecoveryPointInner> object if successful. + */ + public PagedList listByReplicationProtectedItems(final String fabricName, final String protectionContainerName, final String replicatedProtectedItemName) { + ServiceResponse> response = listByReplicationProtectedItemsSinglePageAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationProtectedItemsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get recovery points for a replication protected item. + * Lists the available recovery points for a replication protected item. + * + * @param fabricName The fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replication protected item's 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> listByReplicationProtectedItemsAsync(final String fabricName, final String protectionContainerName, final String replicatedProtectedItemName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationProtectedItemsSinglePageAsync(fabricName, protectionContainerName, replicatedProtectedItemName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationProtectedItemsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get recovery points for a replication protected item. + * Lists the available recovery points for a replication protected item. + * + * @param fabricName The fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replication protected item's name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecoveryPointInner> object + */ + public Observable> listByReplicationProtectedItemsAsync(final String fabricName, final String protectionContainerName, final String replicatedProtectedItemName) { + return listByReplicationProtectedItemsWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get recovery points for a replication protected item. + * Lists the available recovery points for a replication protected item. + * + * @param fabricName The fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replication protected item's name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecoveryPointInner> object + */ + public Observable>> listByReplicationProtectedItemsWithServiceResponseAsync(final String fabricName, final String protectionContainerName, final String replicatedProtectedItemName) { + return listByReplicationProtectedItemsSinglePageAsync(fabricName, protectionContainerName, replicatedProtectedItemName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationProtectedItemsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get recovery points for a replication protected item. + * Lists the available recovery points for a replication protected item. + * + ServiceResponse> * @param fabricName The fabric name. + ServiceResponse> * @param protectionContainerName The protection container name. + ServiceResponse> * @param replicatedProtectedItemName The replication protected item's name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RecoveryPointInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationProtectedItemsSinglePageAsync(final String fabricName, final String protectionContainerName, final String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByReplicationProtectedItems(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationProtectedItemsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationProtectedItemsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get recovery points for a replication protected item. + * Lists the available recovery points for a replication protected item. + * + * @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<RecoveryPointInner> object if successful. + */ + public PagedList listByReplicationProtectedItemsNext(final String nextPageLink) { + ServiceResponse> response = listByReplicationProtectedItemsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationProtectedItemsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get recovery points for a replication protected item. + * Lists the available recovery points for a replication protected item. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByReplicationProtectedItemsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationProtectedItemsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationProtectedItemsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get recovery points for a replication protected item. + * Lists the available recovery points for a replication protected item. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecoveryPointInner> object + */ + public Observable> listByReplicationProtectedItemsNextAsync(final String nextPageLink) { + return listByReplicationProtectedItemsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get recovery points for a replication protected item. + * Lists the available recovery points for a replication protected item. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecoveryPointInner> object + */ + public Observable>> listByReplicationProtectedItemsNextWithServiceResponseAsync(final String nextPageLink) { + return listByReplicationProtectedItemsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationProtectedItemsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get recovery points for a replication protected item. + * Lists the available recovery points for a replication protected item. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RecoveryPointInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationProtectedItemsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByReplicationProtectedItemsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationProtectedItemsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationProtectedItemsNextDelegate(Response response) 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryServicesManager.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryServicesManager.java new file mode 100644 index 0000000000000..4c12e63187335 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryServicesManager.java @@ -0,0 +1,327 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationVaultHealths; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworkMappings; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationvCenters; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationStorageClassificationMappings; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationStorageClassifications; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryServicesProviders; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPoints; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainers; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainerMappings; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectableItems; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationPolicies; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.Operations; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworks; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationLogicalNetworks; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationJobs; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationEvents; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationAlertSettings; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure RecoveryServices resource management. + */ +public final class RecoveryServicesManager extends ManagerCore { + private ReplicationVaultHealths replicationVaultHealths; + private ReplicationProtectedItems replicationProtectedItems; + private ReplicationNetworkMappings replicationNetworkMappings; + private ReplicationFabrics replicationFabrics; + private ReplicationvCenters replicationvCenters; + private ReplicationStorageClassificationMappings replicationStorageClassificationMappings; + private ReplicationStorageClassifications replicationStorageClassifications; + private ReplicationRecoveryServicesProviders replicationRecoveryServicesProviders; + private RecoveryPoints recoveryPoints; + private ReplicationRecoveryPlans replicationRecoveryPlans; + private ReplicationProtectionContainers replicationProtectionContainers; + private ReplicationProtectionContainerMappings replicationProtectionContainerMappings; + private ReplicationProtectableItems replicationProtectableItems; + private ReplicationPolicies replicationPolicies; + private Operations operations; + private ReplicationNetworks replicationNetworks; + private ReplicationLogicalNetworks replicationLogicalNetworks; + private ReplicationJobs replicationJobs; + private ReplicationEvents replicationEvents; + private ReplicationAlertSettings replicationAlertSettings; + /** + * Get a Configurable instance that can be used to create RecoveryServicesManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new RecoveryServicesManager.ConfigurableImpl(); + } + /** + * Creates an instance of RecoveryServicesManager that exposes RecoveryServices resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the RecoveryServicesManager + */ + public static RecoveryServicesManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new RecoveryServicesManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of RecoveryServicesManager that exposes RecoveryServices resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the RecoveryServicesManager + */ + public static RecoveryServicesManager authenticate(RestClient restClient, String subscriptionId) { + return new RecoveryServicesManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of RecoveryServicesManager that exposes RecoveryServices management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing RecoveryServices management API entry points that work across subscriptions + */ + RecoveryServicesManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage ReplicationVaultHealths. + */ + public ReplicationVaultHealths replicationVaultHealths() { + if (this.replicationVaultHealths == null) { + this.replicationVaultHealths = new ReplicationVaultHealthsImpl(this); + } + return this.replicationVaultHealths; + } + + /** + * @return Entry point to manage ReplicationProtectedItems. + */ + public ReplicationProtectedItems replicationProtectedItems() { + if (this.replicationProtectedItems == null) { + this.replicationProtectedItems = new ReplicationProtectedItemsImpl(this); + } + return this.replicationProtectedItems; + } + + /** + * @return Entry point to manage ReplicationNetworkMappings. + */ + public ReplicationNetworkMappings replicationNetworkMappings() { + if (this.replicationNetworkMappings == null) { + this.replicationNetworkMappings = new ReplicationNetworkMappingsImpl(this); + } + return this.replicationNetworkMappings; + } + + /** + * @return Entry point to manage ReplicationFabrics. + */ + public ReplicationFabrics replicationFabrics() { + if (this.replicationFabrics == null) { + this.replicationFabrics = new ReplicationFabricsImpl(this); + } + return this.replicationFabrics; + } + + /** + * @return Entry point to manage ReplicationvCenters. + */ + public ReplicationvCenters replicationvCenters() { + if (this.replicationvCenters == null) { + this.replicationvCenters = new ReplicationvCentersImpl(this); + } + return this.replicationvCenters; + } + + /** + * @return Entry point to manage ReplicationStorageClassificationMappings. + */ + public ReplicationStorageClassificationMappings replicationStorageClassificationMappings() { + if (this.replicationStorageClassificationMappings == null) { + this.replicationStorageClassificationMappings = new ReplicationStorageClassificationMappingsImpl(this); + } + return this.replicationStorageClassificationMappings; + } + + /** + * @return Entry point to manage ReplicationStorageClassifications. + */ + public ReplicationStorageClassifications replicationStorageClassifications() { + if (this.replicationStorageClassifications == null) { + this.replicationStorageClassifications = new ReplicationStorageClassificationsImpl(this); + } + return this.replicationStorageClassifications; + } + + /** + * @return Entry point to manage ReplicationRecoveryServicesProviders. + */ + public ReplicationRecoveryServicesProviders replicationRecoveryServicesProviders() { + if (this.replicationRecoveryServicesProviders == null) { + this.replicationRecoveryServicesProviders = new ReplicationRecoveryServicesProvidersImpl(this); + } + return this.replicationRecoveryServicesProviders; + } + + /** + * @return Entry point to manage RecoveryPoints. + */ + public RecoveryPoints recoveryPoints() { + if (this.recoveryPoints == null) { + this.recoveryPoints = new RecoveryPointsImpl(this); + } + return this.recoveryPoints; + } + + /** + * @return Entry point to manage ReplicationRecoveryPlans. + */ + public ReplicationRecoveryPlans replicationRecoveryPlans() { + if (this.replicationRecoveryPlans == null) { + this.replicationRecoveryPlans = new ReplicationRecoveryPlansImpl(this); + } + return this.replicationRecoveryPlans; + } + + /** + * @return Entry point to manage ReplicationProtectionContainers. + */ + public ReplicationProtectionContainers replicationProtectionContainers() { + if (this.replicationProtectionContainers == null) { + this.replicationProtectionContainers = new ReplicationProtectionContainersImpl(this); + } + return this.replicationProtectionContainers; + } + + /** + * @return Entry point to manage ReplicationProtectionContainerMappings. + */ + public ReplicationProtectionContainerMappings replicationProtectionContainerMappings() { + if (this.replicationProtectionContainerMappings == null) { + this.replicationProtectionContainerMappings = new ReplicationProtectionContainerMappingsImpl(this); + } + return this.replicationProtectionContainerMappings; + } + + /** + * @return Entry point to manage ReplicationProtectableItems. + */ + public ReplicationProtectableItems replicationProtectableItems() { + if (this.replicationProtectableItems == null) { + this.replicationProtectableItems = new ReplicationProtectableItemsImpl(this); + } + return this.replicationProtectableItems; + } + + /** + * @return Entry point to manage ReplicationPolicies. + */ + public ReplicationPolicies replicationPolicies() { + if (this.replicationPolicies == null) { + this.replicationPolicies = new ReplicationPoliciesImpl(this); + } + return this.replicationPolicies; + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * @return Entry point to manage ReplicationNetworks. + */ + public ReplicationNetworks replicationNetworks() { + if (this.replicationNetworks == null) { + this.replicationNetworks = new ReplicationNetworksImpl(this); + } + return this.replicationNetworks; + } + + /** + * @return Entry point to manage ReplicationLogicalNetworks. + */ + public ReplicationLogicalNetworks replicationLogicalNetworks() { + if (this.replicationLogicalNetworks == null) { + this.replicationLogicalNetworks = new ReplicationLogicalNetworksImpl(this); + } + return this.replicationLogicalNetworks; + } + + /** + * @return Entry point to manage ReplicationJobs. + */ + public ReplicationJobs replicationJobs() { + if (this.replicationJobs == null) { + this.replicationJobs = new ReplicationJobsImpl(this); + } + return this.replicationJobs; + } + + /** + * @return Entry point to manage ReplicationEvents. + */ + public ReplicationEvents replicationEvents() { + if (this.replicationEvents == null) { + this.replicationEvents = new ReplicationEventsImpl(this); + } + return this.replicationEvents; + } + + /** + * @return Entry point to manage ReplicationAlertSettings. + */ + public ReplicationAlertSettings replicationAlertSettings() { + if (this.replicationAlertSettings == null) { + this.replicationAlertSettings = new ReplicationAlertSettingsImpl(this); + } + return this.replicationAlertSettings; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public RecoveryServicesManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return RecoveryServicesManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private RecoveryServicesManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new SiteRecoveryManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryServicesProviderImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryServicesProviderImpl.java new file mode 100644 index 0000000000000..03d5dbb110957 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryServicesProviderImpl.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryServicesProvider; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryServicesProviderProperties; + +class RecoveryServicesProviderImpl extends IndexableRefreshableWrapperImpl implements RecoveryServicesProvider { + private final RecoveryServicesManager manager; + private String fabricName; + private String providerName; + + RecoveryServicesProviderImpl(RecoveryServicesProviderInner inner, RecoveryServicesManager manager) { + super(null, inner); + this.manager = manager; + this.fabricName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationFabrics"); + this.providerName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationRecoveryServicesProviders"); + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + ReplicationRecoveryServicesProvidersInner client = this.manager().inner().replicationRecoveryServicesProviders(); + return client.getAsync(this.fabricName, this.providerName); + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public RecoveryServicesProviderProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryServicesProviderInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryServicesProviderInner.java new file mode 100644 index 0000000000000..86c3a3625e115 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/RecoveryServicesProviderInner.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryServicesProviderProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Provider details. + */ +public class RecoveryServicesProviderInner extends ProxyResource { + /** + * Provider properties. + */ + @JsonProperty(value = "properties") + private RecoveryServicesProviderProperties properties; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get provider properties. + * + * @return the properties value + */ + public RecoveryServicesProviderProperties properties() { + return this.properties; + } + + /** + * Set provider properties. + * + * @param properties the properties value to set + * @return the RecoveryServicesProviderInner object itself. + */ + public RecoveryServicesProviderInner withProperties(RecoveryServicesProviderProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the RecoveryServicesProviderInner object itself. + */ + public RecoveryServicesProviderInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationAlertSettingsImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationAlertSettingsImpl.java new file mode 100644 index 0000000000000..5f42ceb121961 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationAlertSettingsImpl.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationAlertSettings; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.Alert; + +class ReplicationAlertSettingsImpl extends WrapperImpl implements ReplicationAlertSettings { + private final RecoveryServicesManager manager; + + ReplicationAlertSettingsImpl(RecoveryServicesManager manager) { + super(manager.inner().replicationAlertSettings()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public AlertImpl define(String name) { + return wrapModel(name); + } + + private AlertImpl wrapModel(AlertInner inner) { + return new AlertImpl(inner, manager()); + } + + private AlertImpl wrapModel(String name) { + return new AlertImpl(name, this.manager()); + } + + @Override + public Observable listAsync() { + ReplicationAlertSettingsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Alert call(AlertInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String alertSettingName) { + ReplicationAlertSettingsInner client = this.inner(); + return client.getAsync(alertSettingName) + .map(new Func1() { + @Override + public Alert call(AlertInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationAlertSettingsInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationAlertSettingsInner.java new file mode 100644 index 0000000000000..9f4387d26b484 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationAlertSettingsInner.java @@ -0,0 +1,587 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.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.management.recoveryservicessiterecovery.v2018_01_10.ConfigureAlertRequest; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ConfigureAlertRequestProperties; +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.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ReplicationAlertSettings. + */ +public class ReplicationAlertSettingsInner { + /** The Retrofit service to perform REST calls. */ + private ReplicationAlertSettingsService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationAlertSettingsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReplicationAlertSettingsInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(ReplicationAlertSettingsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReplicationAlertSettings to be + * used by Retrofit to perform actually REST calls. + */ + interface ReplicationAlertSettingsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationAlertSettings get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("alertSettingName") String alertSettingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationAlertSettings create" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}") + Observable> create(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("alertSettingName") String alertSettingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ConfigureAlertRequest request, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationAlertSettings list" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings") + Observable> list(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationAlertSettings listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets an email notification(alert) configuration. + * Gets the details of the specified email notification(alert) configuration. + * + * @param alertSettingName The name of the email notification configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AlertInner object if successful. + */ + public AlertInner get(String alertSettingName) { + return getWithServiceResponseAsync(alertSettingName).toBlocking().single().body(); + } + + /** + * Gets an email notification(alert) configuration. + * Gets the details of the specified email notification(alert) configuration. + * + * @param alertSettingName The name of the email notification configuration. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String alertSettingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(alertSettingName), serviceCallback); + } + + /** + * Gets an email notification(alert) configuration. + * Gets the details of the specified email notification(alert) configuration. + * + * @param alertSettingName The name of the email notification configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AlertInner object + */ + public Observable getAsync(String alertSettingName) { + return getWithServiceResponseAsync(alertSettingName).map(new Func1, AlertInner>() { + @Override + public AlertInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets an email notification(alert) configuration. + * Gets the details of the specified email notification(alert) configuration. + * + * @param alertSettingName The name of the email notification configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AlertInner object + */ + public Observable> getWithServiceResponseAsync(String alertSettingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (alertSettingName == null) { + throw new IllegalArgumentException("Parameter alertSettingName is required 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(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), alertSettingName, 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); + } + + /** + * Configures email notifications for this vault. + * Create or update an email notification(alert) configuration. + * + * @param alertSettingName The name of the email notification(alert) configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AlertInner object if successful. + */ + public AlertInner create(String alertSettingName) { + return createWithServiceResponseAsync(alertSettingName).toBlocking().single().body(); + } + + /** + * Configures email notifications for this vault. + * Create or update an email notification(alert) configuration. + * + * @param alertSettingName The name of the email notification(alert) configuration. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String alertSettingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(alertSettingName), serviceCallback); + } + + /** + * Configures email notifications for this vault. + * Create or update an email notification(alert) configuration. + * + * @param alertSettingName The name of the email notification(alert) configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AlertInner object + */ + public Observable createAsync(String alertSettingName) { + return createWithServiceResponseAsync(alertSettingName).map(new Func1, AlertInner>() { + @Override + public AlertInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Configures email notifications for this vault. + * Create or update an email notification(alert) configuration. + * + * @param alertSettingName The name of the email notification(alert) configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AlertInner object + */ + public Observable> createWithServiceResponseAsync(String alertSettingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (alertSettingName == null) { + throw new IllegalArgumentException("Parameter alertSettingName 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 ConfigureAlertRequestProperties properties = null; + ConfigureAlertRequest request = new ConfigureAlertRequest(); + request.withProperties(null); + return service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), alertSettingName, this.client.apiVersion(), this.client.acceptLanguage(), request, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Configures email notifications for this vault. + * Create or update an email notification(alert) configuration. + * + * @param alertSettingName The name of the email notification(alert) configuration. + * @param properties The properties of a configure alert request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AlertInner object if successful. + */ + public AlertInner create(String alertSettingName, ConfigureAlertRequestProperties properties) { + return createWithServiceResponseAsync(alertSettingName, properties).toBlocking().single().body(); + } + + /** + * Configures email notifications for this vault. + * Create or update an email notification(alert) configuration. + * + * @param alertSettingName The name of the email notification(alert) configuration. + * @param properties The properties of a configure alert request. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String alertSettingName, ConfigureAlertRequestProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(alertSettingName, properties), serviceCallback); + } + + /** + * Configures email notifications for this vault. + * Create or update an email notification(alert) configuration. + * + * @param alertSettingName The name of the email notification(alert) configuration. + * @param properties The properties of a configure alert request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AlertInner object + */ + public Observable createAsync(String alertSettingName, ConfigureAlertRequestProperties properties) { + return createWithServiceResponseAsync(alertSettingName, properties).map(new Func1, AlertInner>() { + @Override + public AlertInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Configures email notifications for this vault. + * Create or update an email notification(alert) configuration. + * + * @param alertSettingName The name of the email notification(alert) configuration. + * @param properties The properties of a configure alert request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AlertInner object + */ + public Observable> createWithServiceResponseAsync(String alertSettingName, ConfigureAlertRequestProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (alertSettingName == null) { + throw new IllegalArgumentException("Parameter alertSettingName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + ConfigureAlertRequest request = new ConfigureAlertRequest(); + request.withProperties(properties); + return service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), alertSettingName, this.client.apiVersion(), this.client.acceptLanguage(), request, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the list of configured email notification(alert) configurations. + * Gets the list of email notification(alert) configurations for the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown 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 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 list of configured email notification(alert) configurations. + * Gets the list of email notification(alert) configurations for the vault. + * + * @param serviceCallback 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 list of configured email notification(alert) configurations. + * Gets the list of email notification(alert) configurations for the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of configured email notification(alert) configurations. + * Gets the list of email notification(alert) configurations for the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> 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 list of configured email notification(alert) configurations. + * Gets the list of email notification(alert) configurations for the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AlertInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = 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 list of configured email notification(alert) configurations. + * Gets the list of email notification(alert) configurations for the vault. + * + * @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 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 list of configured email notification(alert) configurations. + * Gets the list of email notification(alert) configurations for the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback 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 list of configured email notification(alert) configurations. + * Gets the list of email notification(alert) configurations for the vault. + * + * @param nextPageLink 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> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of configured email notification(alert) configurations. + * Gets the list of email notification(alert) configurations for the vault. + * + * @param nextPageLink 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>> 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 list of configured email notification(alert) configurations. + * Gets the list of email notification(alert) configurations for the vault. + * + 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>> 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationEventsImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationEventsImpl.java new file mode 100644 index 0000000000000..d469d14656f97 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationEventsImpl.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationEvents; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.Event; + +class ReplicationEventsImpl extends WrapperImpl implements ReplicationEvents { + private final RecoveryServicesManager manager; + + ReplicationEventsImpl(RecoveryServicesManager manager) { + super(manager.inner().replicationEvents()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + private EventImpl wrapModel(EventInner inner) { + return new EventImpl(inner, manager()); + } + + @Override + public Observable listAsync() { + ReplicationEventsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Event call(EventInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String eventName) { + ReplicationEventsInner client = this.inner(); + return client.getAsync(eventName) + .map(new Func1() { + @Override + public Event call(EventInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationEventsInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationEventsInner.java new file mode 100644 index 0000000000000..3fb872a3dd5d0 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationEventsInner.java @@ -0,0 +1,514 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ReplicationEvents. + */ +public class ReplicationEventsInner { + /** The Retrofit service to perform REST calls. */ + private ReplicationEventsService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationEventsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReplicationEventsInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(ReplicationEventsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReplicationEvents to be + * used by Retrofit to perform actually REST calls. + */ + interface ReplicationEventsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationEvents get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationEvents/{eventName}") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("eventName") String eventName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationEvents list" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationEvents") + Observable> list(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationEvents listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get the details of an Azure Site recovery event. + * The operation to get the details of an Azure Site recovery event. + * + * @param eventName The name of the Azure Site Recovery event. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the EventInner object if successful. + */ + public EventInner get(String eventName) { + return getWithServiceResponseAsync(eventName).toBlocking().single().body(); + } + + /** + * Get the details of an Azure Site recovery event. + * The operation to get the details of an Azure Site recovery event. + * + * @param eventName The name of the Azure Site Recovery event. + * @param serviceCallback 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 eventName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(eventName), serviceCallback); + } + + /** + * Get the details of an Azure Site recovery event. + * The operation to get the details of an Azure Site recovery event. + * + * @param eventName The name of the Azure Site Recovery event. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EventInner object + */ + public Observable getAsync(String eventName) { + return getWithServiceResponseAsync(eventName).map(new Func1, EventInner>() { + @Override + public EventInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the details of an Azure Site recovery event. + * The operation to get the details of an Azure Site recovery event. + * + * @param eventName The name of the Azure Site Recovery event. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EventInner object + */ + public Observable> getWithServiceResponseAsync(String eventName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (eventName == null) { + throw new IllegalArgumentException("Parameter eventName is required 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(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), eventName, 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); + } + + /** + * Gets the list of Azure Site Recovery events. + * Gets the list of Azure Site Recovery events for the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<EventInner> 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 list of Azure Site Recovery events. + * Gets the list of Azure Site Recovery events for the vault. + * + * @param serviceCallback 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 list of Azure Site Recovery events. + * Gets the list of Azure Site Recovery events for the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of Azure Site Recovery events. + * Gets the list of Azure Site Recovery events for the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventInner> 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 list of Azure Site Recovery events. + * Gets the list of Azure Site Recovery events for the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + return service.list(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), filter, 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 list of Azure Site Recovery events. + * Gets the list of Azure Site Recovery events for the vault. + * + * @param filter OData filter options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<EventInner> object if successful. + */ + public PagedList list(final String filter) { + ServiceResponse> response = listSinglePageAsync(filter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of Azure Site Recovery events. + * Gets the list of Azure Site Recovery events for the vault. + * + * @param filter OData filter options. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of Azure Site Recovery events. + * Gets the list of Azure Site Recovery events for the vault. + * + * @param filter OData filter options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventInner> object + */ + public Observable> listAsync(final String filter) { + return listWithServiceResponseAsync(filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of Azure Site Recovery events. + * Gets the list of Azure Site Recovery events for the vault. + * + * @param filter OData filter options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventInner> object + */ + public Observable>> listWithServiceResponseAsync(final String filter) { + return listSinglePageAsync(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 list of Azure Site Recovery events. + * Gets the list of Azure Site Recovery events for the vault. + * + ServiceResponse> * @param filter OData filter options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String filter) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), filter, 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 list of Azure Site Recovery events. + * Gets the list of Azure Site Recovery events for the vault. + * + * @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<EventInner> 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 list of Azure Site Recovery events. + * Gets the list of Azure Site Recovery events for the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback 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 list of Azure Site Recovery events. + * Gets the list of Azure Site Recovery events for the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventInner> 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 list of Azure Site Recovery events. + * Gets the list of Azure Site Recovery events for the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventInner> 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 list of Azure Site Recovery events. + * Gets the list of Azure Site Recovery events for the vault. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventInner> 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationFabricsImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationFabricsImpl.java new file mode 100644 index 0000000000000..fd09a47fb4790 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationFabricsImpl.java @@ -0,0 +1,129 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.Fabric; + +class ReplicationFabricsImpl extends WrapperImpl implements ReplicationFabrics { + private final RecoveryServicesManager manager; + + ReplicationFabricsImpl(RecoveryServicesManager manager) { + super(manager.inner().replicationFabrics()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public FabricImpl define(String name) { + return wrapModel(name); + } + + private FabricImpl wrapModel(FabricInner inner) { + return new FabricImpl(inner, manager()); + } + + private FabricImpl wrapModel(String name) { + return new FabricImpl(name, this.manager()); + } + + @Override + public Completable migrateToAadAsync(String fabricName) { + ReplicationFabricsInner client = this.inner(); + return client.migrateToAadAsync(fabricName).toCompletable(); + } + + @Override + public Observable renewCertificateAsync(String fabricName) { + ReplicationFabricsInner client = this.inner(); + return client.renewCertificateAsync(fabricName) + .map(new Func1() { + @Override + public Fabric call(FabricInner inner) { + return new FabricImpl(inner, manager()); + } + }); + } + + @Override + public Observable reassociateGatewayAsync(String fabricName) { + ReplicationFabricsInner client = this.inner(); + return client.reassociateGatewayAsync(fabricName) + .map(new Func1() { + @Override + public Fabric call(FabricInner inner) { + return new FabricImpl(inner, manager()); + } + }); + } + + @Override + public Observable checkConsistencyAsync(String fabricName) { + ReplicationFabricsInner client = this.inner(); + return client.checkConsistencyAsync(fabricName) + .map(new Func1() { + @Override + public Fabric call(FabricInner inner) { + return new FabricImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteAsync(String fabricName) { + ReplicationFabricsInner client = this.inner(); + return client.deleteAsync(fabricName).toCompletable(); + } + + @Override + public Observable listAsync() { + ReplicationFabricsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Fabric call(FabricInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String fabricName) { + ReplicationFabricsInner client = this.inner(); + return client.getAsync(fabricName) + .map(new Func1() { + @Override + public Fabric call(FabricInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable purgeAsync(String fabricName) { + ReplicationFabricsInner client = this.inner(); + return client.purgeAsync(fabricName).toCompletable(); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationFabricsInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationFabricsInner.java new file mode 100644 index 0000000000000..76c48db64a6bd --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationFabricsInner.java @@ -0,0 +1,2111 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.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.management.recoveryservicessiterecovery.v2018_01_10.FabricCreationInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.FabricCreationInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.FailoverProcessServerRequest; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.FailoverProcessServerRequestProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RenewCertificateInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RenewCertificateInputProperties; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ReplicationFabrics. + */ +public class ReplicationFabricsInner { + /** The Retrofit service to perform REST calls. */ + private ReplicationFabricsService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationFabricsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReplicationFabricsInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(ReplicationFabricsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReplicationFabrics to be + * used by Retrofit to perform actually REST calls. + */ + interface ReplicationFabricsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics migrateToAad" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/migratetoaad") + Observable> migrateToAad(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics beginMigrateToAad" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/migratetoaad") + Observable> beginMigrateToAad(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics renewCertificate" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/renewCertificate") + Observable> renewCertificate(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RenewCertificateInput renewCertificate, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics beginRenewCertificate" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/renewCertificate") + Observable> beginRenewCertificate(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RenewCertificateInput renewCertificate, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics reassociateGateway" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/reassociateGateway") + Observable> reassociateGateway(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body FailoverProcessServerRequest failoverProcessServerRequest, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics beginReassociateGateway" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/reassociateGateway") + Observable> beginReassociateGateway(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body FailoverProcessServerRequest failoverProcessServerRequest, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics checkConsistency" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/checkConsistency") + Observable> checkConsistency(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics beginCheckConsistency" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/checkConsistency") + Observable> beginCheckConsistency(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics delete" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/remove") + Observable> delete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics beginDelete" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/remove") + Observable> beginDelete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics create" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}") + Observable> create(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body FabricCreationInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics beginCreate" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}") + Observable> beginCreate(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body FabricCreationInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics purge" }) + @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}", method = "DELETE", hasBody = true) + Observable> purge(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics beginPurge" }) + @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}", method = "DELETE", hasBody = true) + Observable> beginPurge(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics list" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics") + Observable> list(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationFabrics listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Migrates the site to AAD. + * The operation to migrate an Azure Site Recovery fabric to AAD. + * + * @param fabricName ASR fabric to migrate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 migrateToAad(String fabricName) { + migrateToAadWithServiceResponseAsync(fabricName).toBlocking().last().body(); + } + + /** + * Migrates the site to AAD. + * The operation to migrate an Azure Site Recovery fabric to AAD. + * + * @param fabricName ASR fabric to migrate. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture migrateToAadAsync(String fabricName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(migrateToAadWithServiceResponseAsync(fabricName), serviceCallback); + } + + /** + * Migrates the site to AAD. + * The operation to migrate an Azure Site Recovery fabric to AAD. + * + * @param fabricName ASR fabric to migrate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable migrateToAadAsync(String fabricName) { + return migrateToAadWithServiceResponseAsync(fabricName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Migrates the site to AAD. + * The operation to migrate an Azure Site Recovery fabric to AAD. + * + * @param fabricName ASR fabric to migrate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> migrateToAadWithServiceResponseAsync(String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.migrateToAad(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Migrates the site to AAD. + * The operation to migrate an Azure Site Recovery fabric to AAD. + * + * @param fabricName ASR fabric to migrate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 beginMigrateToAad(String fabricName) { + beginMigrateToAadWithServiceResponseAsync(fabricName).toBlocking().single().body(); + } + + /** + * Migrates the site to AAD. + * The operation to migrate an Azure Site Recovery fabric to AAD. + * + * @param fabricName ASR fabric to migrate. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginMigrateToAadAsync(String fabricName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginMigrateToAadWithServiceResponseAsync(fabricName), serviceCallback); + } + + /** + * Migrates the site to AAD. + * The operation to migrate an Azure Site Recovery fabric to AAD. + * + * @param fabricName ASR fabric to migrate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginMigrateToAadAsync(String fabricName) { + return beginMigrateToAadWithServiceResponseAsync(fabricName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Migrates the site to AAD. + * The operation to migrate an Azure Site Recovery fabric to AAD. + * + * @param fabricName ASR fabric to migrate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginMigrateToAadWithServiceResponseAsync(String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginMigrateToAad(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginMigrateToAadDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginMigrateToAadDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Renews certificate for the fabric. + * Renews the connection certificate for the ASR replication fabric. + * + * @param fabricName fabric name to renew certs 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 FabricInner object if successful. + */ + public FabricInner renewCertificate(String fabricName) { + return renewCertificateWithServiceResponseAsync(fabricName).toBlocking().last().body(); + } + + /** + * Renews certificate for the fabric. + * Renews the connection certificate for the ASR replication fabric. + * + * @param fabricName fabric name to renew certs 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 renewCertificateAsync(String fabricName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(renewCertificateWithServiceResponseAsync(fabricName), serviceCallback); + } + + /** + * Renews certificate for the fabric. + * Renews the connection certificate for the ASR replication fabric. + * + * @param fabricName fabric name to renew certs for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable renewCertificateAsync(String fabricName) { + return renewCertificateWithServiceResponseAsync(fabricName).map(new Func1, FabricInner>() { + @Override + public FabricInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Renews certificate for the fabric. + * Renews the connection certificate for the ASR replication fabric. + * + * @param fabricName fabric name to renew certs for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> renewCertificateWithServiceResponseAsync(String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName 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 RenewCertificateInputProperties properties = null; + RenewCertificateInput renewCertificate = new RenewCertificateInput(); + renewCertificate.withProperties(null); + Observable> observable = service.renewCertificate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), renewCertificate, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Renews certificate for the fabric. + * Renews the connection certificate for the ASR replication fabric. + * + * @param fabricName fabric name to renew certs for. + * @param properties Renew certificate input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FabricInner object if successful. + */ + public FabricInner renewCertificate(String fabricName, RenewCertificateInputProperties properties) { + return renewCertificateWithServiceResponseAsync(fabricName, properties).toBlocking().last().body(); + } + + /** + * Renews certificate for the fabric. + * Renews the connection certificate for the ASR replication fabric. + * + * @param fabricName fabric name to renew certs for. + * @param properties Renew certificate input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture renewCertificateAsync(String fabricName, RenewCertificateInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(renewCertificateWithServiceResponseAsync(fabricName, properties), serviceCallback); + } + + /** + * Renews certificate for the fabric. + * Renews the connection certificate for the ASR replication fabric. + * + * @param fabricName fabric name to renew certs for. + * @param properties Renew certificate input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable renewCertificateAsync(String fabricName, RenewCertificateInputProperties properties) { + return renewCertificateWithServiceResponseAsync(fabricName, properties).map(new Func1, FabricInner>() { + @Override + public FabricInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Renews certificate for the fabric. + * Renews the connection certificate for the ASR replication fabric. + * + * @param fabricName fabric name to renew certs for. + * @param properties Renew certificate input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> renewCertificateWithServiceResponseAsync(String fabricName, RenewCertificateInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + RenewCertificateInput renewCertificate = new RenewCertificateInput(); + renewCertificate.withProperties(properties); + Observable> observable = service.renewCertificate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), renewCertificate, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Renews certificate for the fabric. + * Renews the connection certificate for the ASR replication fabric. + * + * @param fabricName fabric name to renew certs 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 FabricInner object if successful. + */ + public FabricInner beginRenewCertificate(String fabricName) { + return beginRenewCertificateWithServiceResponseAsync(fabricName).toBlocking().single().body(); + } + + /** + * Renews certificate for the fabric. + * Renews the connection certificate for the ASR replication fabric. + * + * @param fabricName fabric name to renew certs 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 beginRenewCertificateAsync(String fabricName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRenewCertificateWithServiceResponseAsync(fabricName), serviceCallback); + } + + /** + * Renews certificate for the fabric. + * Renews the connection certificate for the ASR replication fabric. + * + * @param fabricName fabric name to renew certs for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FabricInner object + */ + public Observable beginRenewCertificateAsync(String fabricName) { + return beginRenewCertificateWithServiceResponseAsync(fabricName).map(new Func1, FabricInner>() { + @Override + public FabricInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Renews certificate for the fabric. + * Renews the connection certificate for the ASR replication fabric. + * + * @param fabricName fabric name to renew certs for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FabricInner object + */ + public Observable> beginRenewCertificateWithServiceResponseAsync(String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName 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 RenewCertificateInputProperties properties = null; + RenewCertificateInput renewCertificate = new RenewCertificateInput(); + renewCertificate.withProperties(null); + return service.beginRenewCertificate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), renewCertificate, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRenewCertificateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Renews certificate for the fabric. + * Renews the connection certificate for the ASR replication fabric. + * + * @param fabricName fabric name to renew certs for. + * @param properties Renew certificate input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FabricInner object if successful. + */ + public FabricInner beginRenewCertificate(String fabricName, RenewCertificateInputProperties properties) { + return beginRenewCertificateWithServiceResponseAsync(fabricName, properties).toBlocking().single().body(); + } + + /** + * Renews certificate for the fabric. + * Renews the connection certificate for the ASR replication fabric. + * + * @param fabricName fabric name to renew certs for. + * @param properties Renew certificate input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginRenewCertificateAsync(String fabricName, RenewCertificateInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRenewCertificateWithServiceResponseAsync(fabricName, properties), serviceCallback); + } + + /** + * Renews certificate for the fabric. + * Renews the connection certificate for the ASR replication fabric. + * + * @param fabricName fabric name to renew certs for. + * @param properties Renew certificate input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FabricInner object + */ + public Observable beginRenewCertificateAsync(String fabricName, RenewCertificateInputProperties properties) { + return beginRenewCertificateWithServiceResponseAsync(fabricName, properties).map(new Func1, FabricInner>() { + @Override + public FabricInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Renews certificate for the fabric. + * Renews the connection certificate for the ASR replication fabric. + * + * @param fabricName fabric name to renew certs for. + * @param properties Renew certificate input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FabricInner object + */ + public Observable> beginRenewCertificateWithServiceResponseAsync(String fabricName, RenewCertificateInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + RenewCertificateInput renewCertificate = new RenewCertificateInput(); + renewCertificate.withProperties(properties); + return service.beginRenewCertificate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), renewCertificate, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRenewCertificateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRenewCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Perform failover of the process server. + * The operation to move replications from a process server to another process server. + * + * @param fabricName The name of the fabric containing the process server. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FabricInner object if successful. + */ + public FabricInner reassociateGateway(String fabricName) { + return reassociateGatewayWithServiceResponseAsync(fabricName).toBlocking().last().body(); + } + + /** + * Perform failover of the process server. + * The operation to move replications from a process server to another process server. + * + * @param fabricName The name of the fabric containing the process server. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture reassociateGatewayAsync(String fabricName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(reassociateGatewayWithServiceResponseAsync(fabricName), serviceCallback); + } + + /** + * Perform failover of the process server. + * The operation to move replications from a process server to another process server. + * + * @param fabricName The name of the fabric containing the process server. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable reassociateGatewayAsync(String fabricName) { + return reassociateGatewayWithServiceResponseAsync(fabricName).map(new Func1, FabricInner>() { + @Override + public FabricInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Perform failover of the process server. + * The operation to move replications from a process server to another process server. + * + * @param fabricName The name of the fabric containing the process server. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> reassociateGatewayWithServiceResponseAsync(String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName 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 FailoverProcessServerRequestProperties properties = null; + FailoverProcessServerRequest failoverProcessServerRequest = new FailoverProcessServerRequest(); + failoverProcessServerRequest.withProperties(null); + Observable> observable = service.reassociateGateway(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), failoverProcessServerRequest, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Perform failover of the process server. + * The operation to move replications from a process server to another process server. + * + * @param fabricName The name of the fabric containing the process server. + * @param properties The properties of the PS Failover request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FabricInner object if successful. + */ + public FabricInner reassociateGateway(String fabricName, FailoverProcessServerRequestProperties properties) { + return reassociateGatewayWithServiceResponseAsync(fabricName, properties).toBlocking().last().body(); + } + + /** + * Perform failover of the process server. + * The operation to move replications from a process server to another process server. + * + * @param fabricName The name of the fabric containing the process server. + * @param properties The properties of the PS Failover request. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture reassociateGatewayAsync(String fabricName, FailoverProcessServerRequestProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(reassociateGatewayWithServiceResponseAsync(fabricName, properties), serviceCallback); + } + + /** + * Perform failover of the process server. + * The operation to move replications from a process server to another process server. + * + * @param fabricName The name of the fabric containing the process server. + * @param properties The properties of the PS Failover request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable reassociateGatewayAsync(String fabricName, FailoverProcessServerRequestProperties properties) { + return reassociateGatewayWithServiceResponseAsync(fabricName, properties).map(new Func1, FabricInner>() { + @Override + public FabricInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Perform failover of the process server. + * The operation to move replications from a process server to another process server. + * + * @param fabricName The name of the fabric containing the process server. + * @param properties The properties of the PS Failover request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> reassociateGatewayWithServiceResponseAsync(String fabricName, FailoverProcessServerRequestProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + FailoverProcessServerRequest failoverProcessServerRequest = new FailoverProcessServerRequest(); + failoverProcessServerRequest.withProperties(properties); + Observable> observable = service.reassociateGateway(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), failoverProcessServerRequest, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Perform failover of the process server. + * The operation to move replications from a process server to another process server. + * + * @param fabricName The name of the fabric containing the process server. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FabricInner object if successful. + */ + public FabricInner beginReassociateGateway(String fabricName) { + return beginReassociateGatewayWithServiceResponseAsync(fabricName).toBlocking().single().body(); + } + + /** + * Perform failover of the process server. + * The operation to move replications from a process server to another process server. + * + * @param fabricName The name of the fabric containing the process server. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginReassociateGatewayAsync(String fabricName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginReassociateGatewayWithServiceResponseAsync(fabricName), serviceCallback); + } + + /** + * Perform failover of the process server. + * The operation to move replications from a process server to another process server. + * + * @param fabricName The name of the fabric containing the process server. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FabricInner object + */ + public Observable beginReassociateGatewayAsync(String fabricName) { + return beginReassociateGatewayWithServiceResponseAsync(fabricName).map(new Func1, FabricInner>() { + @Override + public FabricInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Perform failover of the process server. + * The operation to move replications from a process server to another process server. + * + * @param fabricName The name of the fabric containing the process server. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FabricInner object + */ + public Observable> beginReassociateGatewayWithServiceResponseAsync(String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName 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 FailoverProcessServerRequestProperties properties = null; + FailoverProcessServerRequest failoverProcessServerRequest = new FailoverProcessServerRequest(); + failoverProcessServerRequest.withProperties(null); + return service.beginReassociateGateway(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), failoverProcessServerRequest, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginReassociateGatewayDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Perform failover of the process server. + * The operation to move replications from a process server to another process server. + * + * @param fabricName The name of the fabric containing the process server. + * @param properties The properties of the PS Failover request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FabricInner object if successful. + */ + public FabricInner beginReassociateGateway(String fabricName, FailoverProcessServerRequestProperties properties) { + return beginReassociateGatewayWithServiceResponseAsync(fabricName, properties).toBlocking().single().body(); + } + + /** + * Perform failover of the process server. + * The operation to move replications from a process server to another process server. + * + * @param fabricName The name of the fabric containing the process server. + * @param properties The properties of the PS Failover request. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginReassociateGatewayAsync(String fabricName, FailoverProcessServerRequestProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginReassociateGatewayWithServiceResponseAsync(fabricName, properties), serviceCallback); + } + + /** + * Perform failover of the process server. + * The operation to move replications from a process server to another process server. + * + * @param fabricName The name of the fabric containing the process server. + * @param properties The properties of the PS Failover request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FabricInner object + */ + public Observable beginReassociateGatewayAsync(String fabricName, FailoverProcessServerRequestProperties properties) { + return beginReassociateGatewayWithServiceResponseAsync(fabricName, properties).map(new Func1, FabricInner>() { + @Override + public FabricInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Perform failover of the process server. + * The operation to move replications from a process server to another process server. + * + * @param fabricName The name of the fabric containing the process server. + * @param properties The properties of the PS Failover request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FabricInner object + */ + public Observable> beginReassociateGatewayWithServiceResponseAsync(String fabricName, FailoverProcessServerRequestProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + FailoverProcessServerRequest failoverProcessServerRequest = new FailoverProcessServerRequest(); + failoverProcessServerRequest.withProperties(properties); + return service.beginReassociateGateway(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), failoverProcessServerRequest, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginReassociateGatewayDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginReassociateGatewayDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Checks the consistency of the ASR fabric. + * The operation to perform a consistency check on the fabric. + * + * @param fabricName Fabric 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 FabricInner object if successful. + */ + public FabricInner checkConsistency(String fabricName) { + return checkConsistencyWithServiceResponseAsync(fabricName).toBlocking().last().body(); + } + + /** + * Checks the consistency of the ASR fabric. + * The operation to perform a consistency check on the fabric. + * + * @param fabricName Fabric 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 checkConsistencyAsync(String fabricName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkConsistencyWithServiceResponseAsync(fabricName), serviceCallback); + } + + /** + * Checks the consistency of the ASR fabric. + * The operation to perform a consistency check on the fabric. + * + * @param fabricName Fabric name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable checkConsistencyAsync(String fabricName) { + return checkConsistencyWithServiceResponseAsync(fabricName).map(new Func1, FabricInner>() { + @Override + public FabricInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks the consistency of the ASR fabric. + * The operation to perform a consistency check on the fabric. + * + * @param fabricName Fabric name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> checkConsistencyWithServiceResponseAsync(String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.checkConsistency(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Checks the consistency of the ASR fabric. + * The operation to perform a consistency check on the fabric. + * + * @param fabricName Fabric 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 FabricInner object if successful. + */ + public FabricInner beginCheckConsistency(String fabricName) { + return beginCheckConsistencyWithServiceResponseAsync(fabricName).toBlocking().single().body(); + } + + /** + * Checks the consistency of the ASR fabric. + * The operation to perform a consistency check on the fabric. + * + * @param fabricName Fabric 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 beginCheckConsistencyAsync(String fabricName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCheckConsistencyWithServiceResponseAsync(fabricName), serviceCallback); + } + + /** + * Checks the consistency of the ASR fabric. + * The operation to perform a consistency check on the fabric. + * + * @param fabricName Fabric name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FabricInner object + */ + public Observable beginCheckConsistencyAsync(String fabricName) { + return beginCheckConsistencyWithServiceResponseAsync(fabricName).map(new Func1, FabricInner>() { + @Override + public FabricInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks the consistency of the ASR fabric. + * The operation to perform a consistency check on the fabric. + * + * @param fabricName Fabric name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FabricInner object + */ + public Observable> beginCheckConsistencyWithServiceResponseAsync(String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginCheckConsistency(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCheckConsistencyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCheckConsistencyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the site. + * The operation to delete or remove an Azure Site Recovery fabric. + * + * @param fabricName ASR fabric to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String fabricName) { + deleteWithServiceResponseAsync(fabricName).toBlocking().last().body(); + } + + /** + * Deletes the site. + * The operation to delete or remove an Azure Site Recovery fabric. + * + * @param fabricName ASR fabric to delete + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String fabricName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(fabricName), serviceCallback); + } + + /** + * Deletes the site. + * The operation to delete or remove an Azure Site Recovery fabric. + * + * @param fabricName ASR fabric to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String fabricName) { + return deleteWithServiceResponseAsync(fabricName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the site. + * The operation to delete or remove an Azure Site Recovery fabric. + * + * @param fabricName ASR fabric to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the site. + * The operation to delete or remove an Azure Site Recovery fabric. + * + * @param fabricName ASR fabric to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String fabricName) { + beginDeleteWithServiceResponseAsync(fabricName).toBlocking().single().body(); + } + + /** + * Deletes the site. + * The operation to delete or remove an Azure Site Recovery fabric. + * + * @param fabricName ASR fabric to delete + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String fabricName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(fabricName), serviceCallback); + } + + /** + * Deletes the site. + * The operation to delete or remove an Azure Site Recovery fabric. + * + * @param fabricName ASR fabric to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String fabricName) { + return beginDeleteWithServiceResponseAsync(fabricName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the site. + * The operation to delete or remove an Azure Site Recovery fabric. + * + * @param fabricName ASR fabric to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of an ASR fabric. + * Gets the details of an Azure Site Recovery fabric. + * + * @param fabricName Fabric 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 FabricInner object if successful. + */ + public FabricInner get(String fabricName) { + return getWithServiceResponseAsync(fabricName).toBlocking().single().body(); + } + + /** + * Gets the details of an ASR fabric. + * Gets the details of an Azure Site Recovery fabric. + * + * @param fabricName Fabric 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 getAsync(String fabricName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(fabricName), serviceCallback); + } + + /** + * Gets the details of an ASR fabric. + * Gets the details of an Azure Site Recovery fabric. + * + * @param fabricName Fabric name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FabricInner object + */ + public Observable getAsync(String fabricName) { + return getWithServiceResponseAsync(fabricName).map(new Func1, FabricInner>() { + @Override + public FabricInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the details of an ASR fabric. + * Gets the details of an Azure Site Recovery fabric. + * + * @param fabricName Fabric name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FabricInner object + */ + public Observable> getWithServiceResponseAsync(String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required 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(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, 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); + } + + /** + * Creates an Azure Site Recoery fabric. + * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + * + * @param fabricName Name of the ASR fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FabricInner object if successful. + */ + public FabricInner create(String fabricName) { + return createWithServiceResponseAsync(fabricName).toBlocking().last().body(); + } + + /** + * Creates an Azure Site Recoery fabric. + * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + * + * @param fabricName Name of the ASR fabric. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String fabricName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(fabricName), serviceCallback); + } + + /** + * Creates an Azure Site Recoery fabric. + * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + * + * @param fabricName Name of the ASR fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String fabricName) { + return createWithServiceResponseAsync(fabricName).map(new Func1, FabricInner>() { + @Override + public FabricInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates an Azure Site Recoery fabric. + * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + * + * @param fabricName Name of the ASR fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName 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 FabricCreationInputProperties properties = null; + FabricCreationInput input = new FabricCreationInput(); + input.withProperties(null); + Observable> observable = service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Creates an Azure Site Recoery fabric. + * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + * + * @param fabricName Name of the ASR fabric. + * @param properties Fabric creation input. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FabricInner object if successful. + */ + public FabricInner create(String fabricName, FabricCreationInputProperties properties) { + return createWithServiceResponseAsync(fabricName, properties).toBlocking().last().body(); + } + + /** + * Creates an Azure Site Recoery fabric. + * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + * + * @param fabricName Name of the ASR fabric. + * @param properties Fabric creation input. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String fabricName, FabricCreationInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(fabricName, properties), serviceCallback); + } + + /** + * Creates an Azure Site Recoery fabric. + * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + * + * @param fabricName Name of the ASR fabric. + * @param properties Fabric creation input. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String fabricName, FabricCreationInputProperties properties) { + return createWithServiceResponseAsync(fabricName, properties).map(new Func1, FabricInner>() { + @Override + public FabricInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates an Azure Site Recoery fabric. + * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + * + * @param fabricName Name of the ASR fabric. + * @param properties Fabric creation input. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String fabricName, FabricCreationInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + FabricCreationInput input = new FabricCreationInput(); + input.withProperties(properties); + Observable> observable = service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates an Azure Site Recoery fabric. + * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + * + * @param fabricName Name of the ASR fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FabricInner object if successful. + */ + public FabricInner beginCreate(String fabricName) { + return beginCreateWithServiceResponseAsync(fabricName).toBlocking().single().body(); + } + + /** + * Creates an Azure Site Recoery fabric. + * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + * + * @param fabricName Name of the ASR fabric. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String fabricName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(fabricName), serviceCallback); + } + + /** + * Creates an Azure Site Recoery fabric. + * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + * + * @param fabricName Name of the ASR fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FabricInner object + */ + public Observable beginCreateAsync(String fabricName) { + return beginCreateWithServiceResponseAsync(fabricName).map(new Func1, FabricInner>() { + @Override + public FabricInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates an Azure Site Recoery fabric. + * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + * + * @param fabricName Name of the ASR fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FabricInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName 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 FabricCreationInputProperties properties = null; + FabricCreationInput input = new FabricCreationInput(); + input.withProperties(null); + return service.beginCreate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Creates an Azure Site Recoery fabric. + * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + * + * @param fabricName Name of the ASR fabric. + * @param properties Fabric creation input. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FabricInner object if successful. + */ + public FabricInner beginCreate(String fabricName, FabricCreationInputProperties properties) { + return beginCreateWithServiceResponseAsync(fabricName, properties).toBlocking().single().body(); + } + + /** + * Creates an Azure Site Recoery fabric. + * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + * + * @param fabricName Name of the ASR fabric. + * @param properties Fabric creation input. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String fabricName, FabricCreationInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(fabricName, properties), serviceCallback); + } + + /** + * Creates an Azure Site Recoery fabric. + * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + * + * @param fabricName Name of the ASR fabric. + * @param properties Fabric creation input. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FabricInner object + */ + public Observable beginCreateAsync(String fabricName, FabricCreationInputProperties properties) { + return beginCreateWithServiceResponseAsync(fabricName, properties).map(new Func1, FabricInner>() { + @Override + public FabricInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates an Azure Site Recoery fabric. + * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + * + * @param fabricName Name of the ASR fabric. + * @param properties Fabric creation input. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FabricInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String fabricName, FabricCreationInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + FabricCreationInput input = new FabricCreationInput(); + input.withProperties(properties); + return service.beginCreate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Purges the site. + * The operation to purge(force delete) an Azure Site Recovery fabric. + * + * @param fabricName ASR fabric to purge. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 purge(String fabricName) { + purgeWithServiceResponseAsync(fabricName).toBlocking().last().body(); + } + + /** + * Purges the site. + * The operation to purge(force delete) an Azure Site Recovery fabric. + * + * @param fabricName ASR fabric to purge. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture purgeAsync(String fabricName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(purgeWithServiceResponseAsync(fabricName), serviceCallback); + } + + /** + * Purges the site. + * The operation to purge(force delete) an Azure Site Recovery fabric. + * + * @param fabricName ASR fabric to purge. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable purgeAsync(String fabricName) { + return purgeWithServiceResponseAsync(fabricName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Purges the site. + * The operation to purge(force delete) an Azure Site Recovery fabric. + * + * @param fabricName ASR fabric to purge. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> purgeWithServiceResponseAsync(String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.purge(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Purges the site. + * The operation to purge(force delete) an Azure Site Recovery fabric. + * + * @param fabricName ASR fabric to purge. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 beginPurge(String fabricName) { + beginPurgeWithServiceResponseAsync(fabricName).toBlocking().single().body(); + } + + /** + * Purges the site. + * The operation to purge(force delete) an Azure Site Recovery fabric. + * + * @param fabricName ASR fabric to purge. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginPurgeAsync(String fabricName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginPurgeWithServiceResponseAsync(fabricName), serviceCallback); + } + + /** + * Purges the site. + * The operation to purge(force delete) an Azure Site Recovery fabric. + * + * @param fabricName ASR fabric to purge. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginPurgeAsync(String fabricName) { + return beginPurgeWithServiceResponseAsync(fabricName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Purges the site. + * The operation to purge(force delete) an Azure Site Recovery fabric. + * + * @param fabricName ASR fabric to purge. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginPurgeWithServiceResponseAsync(String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginPurge(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginPurgeDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginPurgeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the list of ASR fabrics. + * Gets a list of the Azure Site Recovery fabrics in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<FabricInner> 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 list of ASR fabrics. + * Gets a list of the Azure Site Recovery fabrics in the vault. + * + * @param serviceCallback 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 list of ASR fabrics. + * Gets a list of the Azure Site Recovery fabrics in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FabricInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of ASR fabrics. + * Gets a list of the Azure Site Recovery fabrics in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FabricInner> 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 list of ASR fabrics. + * Gets a list of the Azure Site Recovery fabrics in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FabricInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = 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 list of ASR fabrics. + * Gets a list of the Azure Site Recovery fabrics in the vault. + * + * @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<FabricInner> 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 list of ASR fabrics. + * Gets a list of the Azure Site Recovery fabrics in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback 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 list of ASR fabrics. + * Gets a list of the Azure Site Recovery fabrics in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FabricInner> 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 list of ASR fabrics. + * Gets a list of the Azure Site Recovery fabrics in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FabricInner> 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 list of ASR fabrics. + * Gets a list of the Azure Site Recovery fabrics in the vault. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FabricInner> 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationJobsImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationJobsImpl.java new file mode 100644 index 0000000000000..a50d5cc4c2dcd --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationJobsImpl.java @@ -0,0 +1,114 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationJobs; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.Job; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.JobQueryParameter; + +class ReplicationJobsImpl extends WrapperImpl implements ReplicationJobs { + private final RecoveryServicesManager manager; + + ReplicationJobsImpl(RecoveryServicesManager manager) { + super(manager.inner().replicationJobs()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + private JobImpl wrapModel(JobInner inner) { + return new JobImpl(inner, manager()); + } + + @Override + public Observable resumeAsync(String jobName) { + ReplicationJobsInner client = this.inner(); + return client.resumeAsync(jobName) + .map(new Func1() { + @Override + public Job call(JobInner inner) { + return new JobImpl(inner, manager()); + } + }); + } + + @Override + public Observable restartAsync(String jobName) { + ReplicationJobsInner client = this.inner(); + return client.restartAsync(jobName) + .map(new Func1() { + @Override + public Job call(JobInner inner) { + return new JobImpl(inner, manager()); + } + }); + } + + @Override + public Observable cancelAsync(String jobName) { + ReplicationJobsInner client = this.inner(); + return client.cancelAsync(jobName) + .map(new Func1() { + @Override + public Job call(JobInner inner) { + return new JobImpl(inner, manager()); + } + }); + } + + @Override + public Observable exportAsync(JobQueryParameter jobQueryParameter) { + ReplicationJobsInner client = this.inner(); + return client.exportAsync(jobQueryParameter) + .map(new Func1() { + @Override + public Job call(JobInner inner) { + return new JobImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAsync() { + ReplicationJobsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Job call(JobInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String jobName) { + ReplicationJobsInner client = this.inner(); + return client.getAsync(jobName) + .map(new Func1() { + @Override + public Job call(JobInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationJobsInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationJobsInner.java new file mode 100644 index 0000000000000..bbcfb12860413 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationJobsInner.java @@ -0,0 +1,1375 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.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.management.recoveryservicessiterecovery.v2018_01_10.JobQueryParameter; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ResumeJobParams; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ResumeJobParamsProperties; +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 ReplicationJobs. + */ +public class ReplicationJobsInner { + /** The Retrofit service to perform REST calls. */ + private ReplicationJobsService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationJobsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReplicationJobsInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(ReplicationJobsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReplicationJobs to be + * used by Retrofit to perform actually REST calls. + */ + interface ReplicationJobsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationJobs resume" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/resume") + Observable> resume(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ResumeJobParams resumeJobParams, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationJobs beginResume" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/resume") + Observable> beginResume(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ResumeJobParams resumeJobParams, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationJobs restart" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/restart") + Observable> restart(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationJobs beginRestart" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/restart") + Observable> beginRestart(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationJobs cancel" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/cancel") + Observable> cancel(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationJobs beginCancel" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/cancel") + Observable> beginCancel(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationJobs get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationJobs export" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/export") + Observable> export(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body JobQueryParameter jobQueryParameter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationJobs beginExport" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/export") + Observable> beginExport(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body JobQueryParameter jobQueryParameter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationJobs list" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs") + Observable> list(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationJobs listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Resumes the specified job. + * The operation to resume an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobInner object if successful. + */ + public JobInner resume(String jobName) { + return resumeWithServiceResponseAsync(jobName).toBlocking().last().body(); + } + + /** + * Resumes the specified job. + * The operation to resume an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture resumeAsync(String jobName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resumeWithServiceResponseAsync(jobName), serviceCallback); + } + + /** + * Resumes the specified job. + * The operation to resume an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable resumeAsync(String jobName) { + return resumeWithServiceResponseAsync(jobName).map(new Func1, JobInner>() { + @Override + public JobInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resumes the specified job. + * The operation to resume an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> resumeWithServiceResponseAsync(String jobName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName 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 ResumeJobParamsProperties properties = null; + ResumeJobParams resumeJobParams = new ResumeJobParams(); + resumeJobParams.withProperties(null); + Observable> observable = service.resume(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), jobName, this.client.apiVersion(), this.client.acceptLanguage(), resumeJobParams, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Resumes the specified job. + * The operation to resume an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @param properties Resume job properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobInner object if successful. + */ + public JobInner resume(String jobName, ResumeJobParamsProperties properties) { + return resumeWithServiceResponseAsync(jobName, properties).toBlocking().last().body(); + } + + /** + * Resumes the specified job. + * The operation to resume an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @param properties Resume job properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture resumeAsync(String jobName, ResumeJobParamsProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resumeWithServiceResponseAsync(jobName, properties), serviceCallback); + } + + /** + * Resumes the specified job. + * The operation to resume an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @param properties Resume job properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable resumeAsync(String jobName, ResumeJobParamsProperties properties) { + return resumeWithServiceResponseAsync(jobName, properties).map(new Func1, JobInner>() { + @Override + public JobInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resumes the specified job. + * The operation to resume an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @param properties Resume job properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> resumeWithServiceResponseAsync(String jobName, ResumeJobParamsProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + ResumeJobParams resumeJobParams = new ResumeJobParams(); + resumeJobParams.withProperties(properties); + Observable> observable = service.resume(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), jobName, this.client.apiVersion(), this.client.acceptLanguage(), resumeJobParams, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Resumes the specified job. + * The operation to resume an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobInner object if successful. + */ + public JobInner beginResume(String jobName) { + return beginResumeWithServiceResponseAsync(jobName).toBlocking().single().body(); + } + + /** + * Resumes the specified job. + * The operation to resume an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginResumeAsync(String jobName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginResumeWithServiceResponseAsync(jobName), serviceCallback); + } + + /** + * Resumes the specified job. + * The operation to resume an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInner object + */ + public Observable beginResumeAsync(String jobName) { + return beginResumeWithServiceResponseAsync(jobName).map(new Func1, JobInner>() { + @Override + public JobInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resumes the specified job. + * The operation to resume an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInner object + */ + public Observable> beginResumeWithServiceResponseAsync(String jobName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName 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 ResumeJobParamsProperties properties = null; + ResumeJobParams resumeJobParams = new ResumeJobParams(); + resumeJobParams.withProperties(null); + return service.beginResume(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), jobName, this.client.apiVersion(), this.client.acceptLanguage(), resumeJobParams, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginResumeDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Resumes the specified job. + * The operation to resume an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @param properties Resume job properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobInner object if successful. + */ + public JobInner beginResume(String jobName, ResumeJobParamsProperties properties) { + return beginResumeWithServiceResponseAsync(jobName, properties).toBlocking().single().body(); + } + + /** + * Resumes the specified job. + * The operation to resume an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @param properties Resume job properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginResumeAsync(String jobName, ResumeJobParamsProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginResumeWithServiceResponseAsync(jobName, properties), serviceCallback); + } + + /** + * Resumes the specified job. + * The operation to resume an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @param properties Resume job properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInner object + */ + public Observable beginResumeAsync(String jobName, ResumeJobParamsProperties properties) { + return beginResumeWithServiceResponseAsync(jobName, properties).map(new Func1, JobInner>() { + @Override + public JobInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resumes the specified job. + * The operation to resume an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @param properties Resume job properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInner object + */ + public Observable> beginResumeWithServiceResponseAsync(String jobName, ResumeJobParamsProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + ResumeJobParams resumeJobParams = new ResumeJobParams(); + resumeJobParams.withProperties(properties); + return service.beginResume(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), jobName, this.client.apiVersion(), this.client.acceptLanguage(), resumeJobParams, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginResumeDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginResumeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Restarts the specified job. + * The operation to restart an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobInner object if successful. + */ + public JobInner restart(String jobName) { + return restartWithServiceResponseAsync(jobName).toBlocking().last().body(); + } + + /** + * Restarts the specified job. + * The operation to restart an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture restartAsync(String jobName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restartWithServiceResponseAsync(jobName), serviceCallback); + } + + /** + * Restarts the specified job. + * The operation to restart an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable restartAsync(String jobName) { + return restartWithServiceResponseAsync(jobName).map(new Func1, JobInner>() { + @Override + public JobInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restarts the specified job. + * The operation to restart an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> restartWithServiceResponseAsync(String jobName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.restart(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), jobName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Restarts the specified job. + * The operation to restart an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobInner object if successful. + */ + public JobInner beginRestart(String jobName) { + return beginRestartWithServiceResponseAsync(jobName).toBlocking().single().body(); + } + + /** + * Restarts the specified job. + * The operation to restart an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginRestartAsync(String jobName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(jobName), serviceCallback); + } + + /** + * Restarts the specified job. + * The operation to restart an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInner object + */ + public Observable beginRestartAsync(String jobName) { + return beginRestartWithServiceResponseAsync(jobName).map(new Func1, JobInner>() { + @Override + public JobInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restarts the specified job. + * The operation to restart an Azure Site Recovery job. + * + * @param jobName Job identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInner object + */ + public Observable> beginRestartWithServiceResponseAsync(String jobName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginRestart(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), jobName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRestartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Cancels the specified job. + * The operation to cancel an Azure Site Recovery job. + * + * @param jobName Job indentifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobInner object if successful. + */ + public JobInner cancel(String jobName) { + return cancelWithServiceResponseAsync(jobName).toBlocking().last().body(); + } + + /** + * Cancels the specified job. + * The operation to cancel an Azure Site Recovery job. + * + * @param jobName Job indentifier. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture cancelAsync(String jobName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(cancelWithServiceResponseAsync(jobName), serviceCallback); + } + + /** + * Cancels the specified job. + * The operation to cancel an Azure Site Recovery job. + * + * @param jobName Job indentifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable cancelAsync(String jobName) { + return cancelWithServiceResponseAsync(jobName).map(new Func1, JobInner>() { + @Override + public JobInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Cancels the specified job. + * The operation to cancel an Azure Site Recovery job. + * + * @param jobName Job indentifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> cancelWithServiceResponseAsync(String jobName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.cancel(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), jobName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Cancels the specified job. + * The operation to cancel an Azure Site Recovery job. + * + * @param jobName Job indentifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobInner object if successful. + */ + public JobInner beginCancel(String jobName) { + return beginCancelWithServiceResponseAsync(jobName).toBlocking().single().body(); + } + + /** + * Cancels the specified job. + * The operation to cancel an Azure Site Recovery job. + * + * @param jobName Job indentifier. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCancelAsync(String jobName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCancelWithServiceResponseAsync(jobName), serviceCallback); + } + + /** + * Cancels the specified job. + * The operation to cancel an Azure Site Recovery job. + * + * @param jobName Job indentifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInner object + */ + public Observable beginCancelAsync(String jobName) { + return beginCancelWithServiceResponseAsync(jobName).map(new Func1, JobInner>() { + @Override + public JobInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Cancels the specified job. + * The operation to cancel an Azure Site Recovery job. + * + * @param jobName Job indentifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInner object + */ + public Observable> beginCancelWithServiceResponseAsync(String jobName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginCancel(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), jobName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCancelDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCancelDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the job details. + * Get the details of an Azure Site Recovery job. + * + * @param jobName Job identifier + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobInner object if successful. + */ + public JobInner get(String jobName) { + return getWithServiceResponseAsync(jobName).toBlocking().single().body(); + } + + /** + * Gets the job details. + * Get the details of an Azure Site Recovery job. + * + * @param jobName Job identifier + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String jobName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(jobName), serviceCallback); + } + + /** + * Gets the job details. + * Get the details of an Azure Site Recovery job. + * + * @param jobName Job identifier + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInner object + */ + public Observable getAsync(String jobName) { + return getWithServiceResponseAsync(jobName).map(new Func1, JobInner>() { + @Override + public JobInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the job details. + * Get the details of an Azure Site Recovery job. + * + * @param jobName Job identifier + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInner object + */ + public Observable> getWithServiceResponseAsync(String jobName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required 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(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), jobName, 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); + } + + /** + * Exports the details of the Azure Site Recovery jobs of the vault. + * The operation to export the details of the Azure Site Recovery jobs of the vault. + * + * @param jobQueryParameter job query filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobInner object if successful. + */ + public JobInner export(JobQueryParameter jobQueryParameter) { + return exportWithServiceResponseAsync(jobQueryParameter).toBlocking().last().body(); + } + + /** + * Exports the details of the Azure Site Recovery jobs of the vault. + * The operation to export the details of the Azure Site Recovery jobs of the vault. + * + * @param jobQueryParameter job query filter. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture exportAsync(JobQueryParameter jobQueryParameter, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(exportWithServiceResponseAsync(jobQueryParameter), serviceCallback); + } + + /** + * Exports the details of the Azure Site Recovery jobs of the vault. + * The operation to export the details of the Azure Site Recovery jobs of the vault. + * + * @param jobQueryParameter job query filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable exportAsync(JobQueryParameter jobQueryParameter) { + return exportWithServiceResponseAsync(jobQueryParameter).map(new Func1, JobInner>() { + @Override + public JobInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Exports the details of the Azure Site Recovery jobs of the vault. + * The operation to export the details of the Azure Site Recovery jobs of the vault. + * + * @param jobQueryParameter job query filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> exportWithServiceResponseAsync(JobQueryParameter jobQueryParameter) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (jobQueryParameter == null) { + throw new IllegalArgumentException("Parameter jobQueryParameter is required and cannot be null."); + } + Validator.validate(jobQueryParameter); + Observable> observable = service.export(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), jobQueryParameter, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Exports the details of the Azure Site Recovery jobs of the vault. + * The operation to export the details of the Azure Site Recovery jobs of the vault. + * + * @param jobQueryParameter job query filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobInner object if successful. + */ + public JobInner beginExport(JobQueryParameter jobQueryParameter) { + return beginExportWithServiceResponseAsync(jobQueryParameter).toBlocking().single().body(); + } + + /** + * Exports the details of the Azure Site Recovery jobs of the vault. + * The operation to export the details of the Azure Site Recovery jobs of the vault. + * + * @param jobQueryParameter job query filter. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginExportAsync(JobQueryParameter jobQueryParameter, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginExportWithServiceResponseAsync(jobQueryParameter), serviceCallback); + } + + /** + * Exports the details of the Azure Site Recovery jobs of the vault. + * The operation to export the details of the Azure Site Recovery jobs of the vault. + * + * @param jobQueryParameter job query filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInner object + */ + public Observable beginExportAsync(JobQueryParameter jobQueryParameter) { + return beginExportWithServiceResponseAsync(jobQueryParameter).map(new Func1, JobInner>() { + @Override + public JobInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Exports the details of the Azure Site Recovery jobs of the vault. + * The operation to export the details of the Azure Site Recovery jobs of the vault. + * + * @param jobQueryParameter job query filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInner object + */ + public Observable> beginExportWithServiceResponseAsync(JobQueryParameter jobQueryParameter) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (jobQueryParameter == null) { + throw new IllegalArgumentException("Parameter jobQueryParameter is required and cannot be null."); + } + Validator.validate(jobQueryParameter); + return service.beginExport(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), jobQueryParameter, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginExportDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginExportDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the list of jobs. + * Gets the list of Azure Site Recovery Jobs for the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobInner> 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 list of jobs. + * Gets the list of Azure Site Recovery Jobs for the vault. + * + * @param serviceCallback 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 list of jobs. + * Gets the list of Azure Site Recovery Jobs for the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of jobs. + * Gets the list of Azure Site Recovery Jobs for the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobInner> 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 list of jobs. + * Gets the list of Azure Site Recovery Jobs for the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<JobInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + return service.list(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), filter, 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 list of jobs. + * Gets the list of Azure Site Recovery Jobs for the vault. + * + * @param filter OData filter options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobInner> object if successful. + */ + public PagedList list(final String filter) { + ServiceResponse> response = listSinglePageAsync(filter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of jobs. + * Gets the list of Azure Site Recovery Jobs for the vault. + * + * @param filter OData filter options. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of jobs. + * Gets the list of Azure Site Recovery Jobs for the vault. + * + * @param filter OData filter options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobInner> object + */ + public Observable> listAsync(final String filter) { + return listWithServiceResponseAsync(filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of jobs. + * Gets the list of Azure Site Recovery Jobs for the vault. + * + * @param filter OData filter options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobInner> object + */ + public Observable>> listWithServiceResponseAsync(final String filter) { + return listSinglePageAsync(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 list of jobs. + * Gets the list of Azure Site Recovery Jobs for the vault. + * + ServiceResponse> * @param filter OData filter options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<JobInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String filter) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), filter, 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 list of jobs. + * Gets the list of Azure Site Recovery Jobs for the vault. + * + * @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<JobInner> 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 list of jobs. + * Gets the list of Azure Site Recovery Jobs for the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback 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 list of jobs. + * Gets the list of Azure Site Recovery Jobs for the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobInner> 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 list of jobs. + * Gets the list of Azure Site Recovery Jobs for the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobInner> 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 list of jobs. + * Gets the list of Azure Site Recovery Jobs for the vault. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<JobInner> 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationLogicalNetworksImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationLogicalNetworksImpl.java new file mode 100644 index 0000000000000..f382f3198654a --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationLogicalNetworksImpl.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationLogicalNetworks; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.LogicalNetwork; + +class ReplicationLogicalNetworksImpl extends WrapperImpl implements ReplicationLogicalNetworks { + private final RecoveryServicesManager manager; + + ReplicationLogicalNetworksImpl(RecoveryServicesManager manager) { + super(manager.inner().replicationLogicalNetworks()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + private LogicalNetworkImpl wrapModel(LogicalNetworkInner inner) { + return new LogicalNetworkImpl(inner, manager()); + } + + @Override + public Observable listByReplicationFabricsAsync(final String fabricName) { + ReplicationLogicalNetworksInner client = this.inner(); + return client.listByReplicationFabricsAsync(fabricName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public LogicalNetwork call(LogicalNetworkInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String fabricName, String logicalNetworkName) { + ReplicationLogicalNetworksInner client = this.inner(); + return client.getAsync(fabricName, logicalNetworkName) + .map(new Func1() { + @Override + public LogicalNetwork call(LogicalNetworkInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationLogicalNetworksInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationLogicalNetworksInner.java new file mode 100644 index 0000000000000..24e155f776fe2 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationLogicalNetworksInner.java @@ -0,0 +1,412 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ReplicationLogicalNetworks. + */ +public class ReplicationLogicalNetworksInner { + /** The Retrofit service to perform REST calls. */ + private ReplicationLogicalNetworksService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationLogicalNetworksInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReplicationLogicalNetworksInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(ReplicationLogicalNetworksService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReplicationLogicalNetworks to be + * used by Retrofit to perform actually REST calls. + */ + interface ReplicationLogicalNetworksService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationLogicalNetworks listByReplicationFabrics" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationLogicalNetworks") + Observable> listByReplicationFabrics(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationLogicalNetworks get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationLogicalNetworks/{logicalNetworkName}") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("logicalNetworkName") String logicalNetworkName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationLogicalNetworks listByReplicationFabricsNext" }) + @GET + Observable> listByReplicationFabricsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the list of logical networks under a fabric. + * Lists all the logical networks of the Azure Site Recovery fabric. + * + * @param fabricName 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<LogicalNetworkInner> object if successful. + */ + public PagedList listByReplicationFabrics(final String fabricName) { + ServiceResponse> response = listByReplicationFabricsSinglePageAsync(fabricName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of logical networks under a fabric. + * Lists all the logical networks of the Azure Site Recovery fabric. + * + * @param fabricName 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> listByReplicationFabricsAsync(final String fabricName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationFabricsSinglePageAsync(fabricName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of logical networks under a fabric. + * Lists all the logical networks of the Azure Site Recovery fabric. + * + * @param fabricName Server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<LogicalNetworkInner> object + */ + public Observable> listByReplicationFabricsAsync(final String fabricName) { + return listByReplicationFabricsWithServiceResponseAsync(fabricName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of logical networks under a fabric. + * Lists all the logical networks of the Azure Site Recovery fabric. + * + * @param fabricName Server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<LogicalNetworkInner> object + */ + public Observable>> listByReplicationFabricsWithServiceResponseAsync(final String fabricName) { + return listByReplicationFabricsSinglePageAsync(fabricName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationFabricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of logical networks under a fabric. + * Lists all the logical networks of the Azure Site Recovery fabric. + * + ServiceResponse> * @param fabricName Server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<LogicalNetworkInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationFabricsSinglePageAsync(final String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByReplicationFabrics(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationFabricsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationFabricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a logical network with specified server id and logical network name. + * Gets the details of a logical network. + * + * @param fabricName Server Id. + * @param logicalNetworkName Logical network 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 LogicalNetworkInner object if successful. + */ + public LogicalNetworkInner get(String fabricName, String logicalNetworkName) { + return getWithServiceResponseAsync(fabricName, logicalNetworkName).toBlocking().single().body(); + } + + /** + * Gets a logical network with specified server id and logical network name. + * Gets the details of a logical network. + * + * @param fabricName Server Id. + * @param logicalNetworkName Logical network 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 getAsync(String fabricName, String logicalNetworkName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(fabricName, logicalNetworkName), serviceCallback); + } + + /** + * Gets a logical network with specified server id and logical network name. + * Gets the details of a logical network. + * + * @param fabricName Server Id. + * @param logicalNetworkName Logical network name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LogicalNetworkInner object + */ + public Observable getAsync(String fabricName, String logicalNetworkName) { + return getWithServiceResponseAsync(fabricName, logicalNetworkName).map(new Func1, LogicalNetworkInner>() { + @Override + public LogicalNetworkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a logical network with specified server id and logical network name. + * Gets the details of a logical network. + * + * @param fabricName Server Id. + * @param logicalNetworkName Logical network name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LogicalNetworkInner object + */ + public Observable> getWithServiceResponseAsync(String fabricName, String logicalNetworkName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (logicalNetworkName == null) { + throw new IllegalArgumentException("Parameter logicalNetworkName is required 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(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, logicalNetworkName, 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); + } + + /** + * Gets the list of logical networks under a fabric. + * Lists all the logical networks of the Azure Site Recovery fabric. + * + * @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<LogicalNetworkInner> object if successful. + */ + public PagedList listByReplicationFabricsNext(final String nextPageLink) { + ServiceResponse> response = listByReplicationFabricsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of logical networks under a fabric. + * Lists all the logical networks of the Azure Site Recovery fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByReplicationFabricsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationFabricsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of logical networks under a fabric. + * Lists all the logical networks of the Azure Site Recovery fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<LogicalNetworkInner> object + */ + public Observable> listByReplicationFabricsNextAsync(final String nextPageLink) { + return listByReplicationFabricsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of logical networks under a fabric. + * Lists all the logical networks of the Azure Site Recovery fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<LogicalNetworkInner> object + */ + public Observable>> listByReplicationFabricsNextWithServiceResponseAsync(final String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationFabricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of logical networks under a fabric. + * Lists all the logical networks of the Azure Site Recovery fabric. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<LogicalNetworkInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationFabricsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByReplicationFabricsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationFabricsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationFabricsNextDelegate(Response response) 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationNetworkMappingsImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationNetworkMappingsImpl.java new file mode 100644 index 0000000000000..6814f38c678f7 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationNetworkMappingsImpl.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworkMappings; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import rx.Completable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.NetworkMapping; + +class ReplicationNetworkMappingsImpl extends WrapperImpl implements ReplicationNetworkMappings { + private final RecoveryServicesManager manager; + + ReplicationNetworkMappingsImpl(RecoveryServicesManager manager) { + super(manager.inner().replicationNetworkMappings()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public NetworkMappingImpl define(String name) { + return wrapModel(name); + } + + private NetworkMappingImpl wrapModel(NetworkMappingInner inner) { + return new NetworkMappingImpl(inner, manager()); + } + + private NetworkMappingImpl wrapModel(String name) { + return new NetworkMappingImpl(name, this.manager()); + } + + @Override + public Observable listByReplicationNetworksAsync(final String fabricName, final String networkName) { + ReplicationNetworkMappingsInner client = this.inner(); + return client.listByReplicationNetworksAsync(fabricName, networkName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public NetworkMapping call(NetworkMappingInner inner) { + return new NetworkMappingImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAsync(String fabricName, String networkName, String networkMappingName) { + ReplicationNetworkMappingsInner client = this.inner(); + return client.getAsync(fabricName, networkName, networkMappingName) + .map(new Func1() { + @Override + public NetworkMapping call(NetworkMappingInner inner) { + return new NetworkMappingImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteAsync(String fabricName, String networkName, String networkMappingName) { + ReplicationNetworkMappingsInner client = this.inner(); + return client.deleteAsync(fabricName, networkName, networkMappingName).toCompletable(); + } + + @Override + public Observable listAsync() { + ReplicationNetworkMappingsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public NetworkMapping call(NetworkMappingInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationNetworkMappingsInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationNetworkMappingsInner.java new file mode 100644 index 0000000000000..e96210dfa4da5 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationNetworkMappingsInner.java @@ -0,0 +1,1672 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.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.management.recoveryservicessiterecovery.v2018_01_10.CreateNetworkMappingInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.CreateNetworkMappingInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.UpdateNetworkMappingInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.UpdateNetworkMappingInputProperties; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ReplicationNetworkMappings. + */ +public class ReplicationNetworkMappingsInner { + /** The Retrofit service to perform REST calls. */ + private ReplicationNetworkMappingsService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationNetworkMappingsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReplicationNetworkMappingsInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(ReplicationNetworkMappingsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReplicationNetworkMappings to be + * used by Retrofit to perform actually REST calls. + */ + interface ReplicationNetworkMappingsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworkMappings list" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationNetworkMappings") + Observable> list(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworkMappings listByReplicationNetworks" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings") + Observable> listByReplicationNetworks(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("networkName") String networkName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworkMappings get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("networkName") String networkName, @Path("networkMappingName") String networkMappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworkMappings create" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}") + Observable> create(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("networkName") String networkName, @Path("networkMappingName") String networkMappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CreateNetworkMappingInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworkMappings beginCreate" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}") + Observable> beginCreate(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("networkName") String networkName, @Path("networkMappingName") String networkMappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CreateNetworkMappingInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworkMappings delete" }) + @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("networkName") String networkName, @Path("networkMappingName") String networkMappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworkMappings beginDelete" }) + @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("networkName") String networkName, @Path("networkMappingName") String networkMappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworkMappings update" }) + @PATCH("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}") + Observable> update(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("networkName") String networkName, @Path("networkMappingName") String networkMappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UpdateNetworkMappingInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworkMappings beginUpdate" }) + @PATCH("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}") + Observable> beginUpdate(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("networkName") String networkName, @Path("networkMappingName") String networkMappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UpdateNetworkMappingInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworkMappings 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.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworkMappings listByReplicationNetworksNext" }) + @GET + Observable> listByReplicationNetworksNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all the network mappings under a vault. + * Lists all ASR network mappings in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<NetworkMappingInner> 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 all the network mappings under a vault. + * Lists all ASR network mappings in the vault. + * + * @param serviceCallback 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 all the network mappings under a vault. + * Lists all ASR network mappings in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkMappingInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the network mappings under a vault. + * Lists all ASR network mappings in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkMappingInner> 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 all the network mappings under a vault. + * Lists all ASR network mappings in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkMappingInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all the network mappings under a network. + * Lists all ASR network mappings for the specified network. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network 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<NetworkMappingInner> object if successful. + */ + public PagedList listByReplicationNetworks(final String fabricName, final String networkName) { + ServiceResponse> response = listByReplicationNetworksSinglePageAsync(fabricName, networkName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationNetworksNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the network mappings under a network. + * Lists all ASR network mappings for the specified network. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network 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> listByReplicationNetworksAsync(final String fabricName, final String networkName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationNetworksSinglePageAsync(fabricName, networkName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationNetworksNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the network mappings under a network. + * Lists all ASR network mappings for the specified network. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkMappingInner> object + */ + public Observable> listByReplicationNetworksAsync(final String fabricName, final String networkName) { + return listByReplicationNetworksWithServiceResponseAsync(fabricName, networkName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the network mappings under a network. + * Lists all ASR network mappings for the specified network. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkMappingInner> object + */ + public Observable>> listByReplicationNetworksWithServiceResponseAsync(final String fabricName, final String networkName) { + return listByReplicationNetworksSinglePageAsync(fabricName, networkName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationNetworksNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the network mappings under a network. + * Lists all ASR network mappings for the specified network. + * + ServiceResponse> * @param fabricName Primary fabric name. + ServiceResponse> * @param networkName Primary network name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkMappingInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationNetworksSinglePageAsync(final String fabricName, final String networkName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (networkName == null) { + throw new IllegalArgumentException("Parameter networkName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByReplicationNetworks(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, networkName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationNetworksDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationNetworksDelegate(Response response) 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 network mapping by name. + * Gets the details of an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping 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 NetworkMappingInner object if successful. + */ + public NetworkMappingInner get(String fabricName, String networkName, String networkMappingName) { + return getWithServiceResponseAsync(fabricName, networkName, networkMappingName).toBlocking().single().body(); + } + + /** + * Gets network mapping by name. + * Gets the details of an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping 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 getAsync(String fabricName, String networkName, String networkMappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(fabricName, networkName, networkMappingName), serviceCallback); + } + + /** + * Gets network mapping by name. + * Gets the details of an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkMappingInner object + */ + public Observable getAsync(String fabricName, String networkName, String networkMappingName) { + return getWithServiceResponseAsync(fabricName, networkName, networkMappingName).map(new Func1, NetworkMappingInner>() { + @Override + public NetworkMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets network mapping by name. + * Gets the details of an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkMappingInner object + */ + public Observable> getWithServiceResponseAsync(String fabricName, String networkName, String networkMappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (networkName == null) { + throw new IllegalArgumentException("Parameter networkName is required and cannot be null."); + } + if (networkMappingName == null) { + throw new IllegalArgumentException("Parameter networkMappingName is required 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(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, networkName, networkMappingName, 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); + } + + /** + * Creates network mapping. + * The operation to create an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping 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 NetworkMappingInner object if successful. + */ + public NetworkMappingInner create(String fabricName, String networkName, String networkMappingName) { + return createWithServiceResponseAsync(fabricName, networkName, networkMappingName).toBlocking().last().body(); + } + + /** + * Creates network mapping. + * The operation to create an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping 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 createAsync(String fabricName, String networkName, String networkMappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(fabricName, networkName, networkMappingName), serviceCallback); + } + + /** + * Creates network mapping. + * The operation to create an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String fabricName, String networkName, String networkMappingName) { + return createWithServiceResponseAsync(fabricName, networkName, networkMappingName).map(new Func1, NetworkMappingInner>() { + @Override + public NetworkMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates network mapping. + * The operation to create an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String fabricName, String networkName, String networkMappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (networkName == null) { + throw new IllegalArgumentException("Parameter networkName is required and cannot be null."); + } + if (networkMappingName == null) { + throw new IllegalArgumentException("Parameter networkMappingName 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 CreateNetworkMappingInputProperties properties = null; + CreateNetworkMappingInput input = new CreateNetworkMappingInput(); + input.withProperties(null); + Observable> observable = service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, networkName, networkMappingName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Creates network mapping. + * The operation to create an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @param properties Input properties for creating network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkMappingInner object if successful. + */ + public NetworkMappingInner create(String fabricName, String networkName, String networkMappingName, CreateNetworkMappingInputProperties properties) { + return createWithServiceResponseAsync(fabricName, networkName, networkMappingName, properties).toBlocking().last().body(); + } + + /** + * Creates network mapping. + * The operation to create an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @param properties Input properties for creating network mapping. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String fabricName, String networkName, String networkMappingName, CreateNetworkMappingInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(fabricName, networkName, networkMappingName, properties), serviceCallback); + } + + /** + * Creates network mapping. + * The operation to create an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @param properties Input properties for creating network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String fabricName, String networkName, String networkMappingName, CreateNetworkMappingInputProperties properties) { + return createWithServiceResponseAsync(fabricName, networkName, networkMappingName, properties).map(new Func1, NetworkMappingInner>() { + @Override + public NetworkMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates network mapping. + * The operation to create an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @param properties Input properties for creating network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String fabricName, String networkName, String networkMappingName, CreateNetworkMappingInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (networkName == null) { + throw new IllegalArgumentException("Parameter networkName is required and cannot be null."); + } + if (networkMappingName == null) { + throw new IllegalArgumentException("Parameter networkMappingName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + CreateNetworkMappingInput input = new CreateNetworkMappingInput(); + input.withProperties(properties); + Observable> observable = service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, networkName, networkMappingName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates network mapping. + * The operation to create an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping 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 NetworkMappingInner object if successful. + */ + public NetworkMappingInner beginCreate(String fabricName, String networkName, String networkMappingName) { + return beginCreateWithServiceResponseAsync(fabricName, networkName, networkMappingName).toBlocking().single().body(); + } + + /** + * Creates network mapping. + * The operation to create an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping 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 beginCreateAsync(String fabricName, String networkName, String networkMappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(fabricName, networkName, networkMappingName), serviceCallback); + } + + /** + * Creates network mapping. + * The operation to create an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkMappingInner object + */ + public Observable beginCreateAsync(String fabricName, String networkName, String networkMappingName) { + return beginCreateWithServiceResponseAsync(fabricName, networkName, networkMappingName).map(new Func1, NetworkMappingInner>() { + @Override + public NetworkMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates network mapping. + * The operation to create an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkMappingInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String fabricName, String networkName, String networkMappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (networkName == null) { + throw new IllegalArgumentException("Parameter networkName is required and cannot be null."); + } + if (networkMappingName == null) { + throw new IllegalArgumentException("Parameter networkMappingName 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 CreateNetworkMappingInputProperties properties = null; + CreateNetworkMappingInput input = new CreateNetworkMappingInput(); + input.withProperties(null); + return service.beginCreate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, networkName, networkMappingName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Creates network mapping. + * The operation to create an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @param properties Input properties for creating network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkMappingInner object if successful. + */ + public NetworkMappingInner beginCreate(String fabricName, String networkName, String networkMappingName, CreateNetworkMappingInputProperties properties) { + return beginCreateWithServiceResponseAsync(fabricName, networkName, networkMappingName, properties).toBlocking().single().body(); + } + + /** + * Creates network mapping. + * The operation to create an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @param properties Input properties for creating network mapping. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String fabricName, String networkName, String networkMappingName, CreateNetworkMappingInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(fabricName, networkName, networkMappingName, properties), serviceCallback); + } + + /** + * Creates network mapping. + * The operation to create an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @param properties Input properties for creating network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkMappingInner object + */ + public Observable beginCreateAsync(String fabricName, String networkName, String networkMappingName, CreateNetworkMappingInputProperties properties) { + return beginCreateWithServiceResponseAsync(fabricName, networkName, networkMappingName, properties).map(new Func1, NetworkMappingInner>() { + @Override + public NetworkMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates network mapping. + * The operation to create an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @param properties Input properties for creating network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkMappingInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String fabricName, String networkName, String networkMappingName, CreateNetworkMappingInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (networkName == null) { + throw new IllegalArgumentException("Parameter networkName is required and cannot be null."); + } + if (networkMappingName == null) { + throw new IllegalArgumentException("Parameter networkMappingName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + CreateNetworkMappingInput input = new CreateNetworkMappingInput(); + input.withProperties(properties); + return service.beginCreate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, networkName, networkMappingName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete network mapping. + * The operation to delete a network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName ARM Resource Name for network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 fabricName, String networkName, String networkMappingName) { + deleteWithServiceResponseAsync(fabricName, networkName, networkMappingName).toBlocking().last().body(); + } + + /** + * Delete network mapping. + * The operation to delete a network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName ARM Resource Name for network mapping. + * @param serviceCallback 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 fabricName, String networkName, String networkMappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(fabricName, networkName, networkMappingName), serviceCallback); + } + + /** + * Delete network mapping. + * The operation to delete a network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName ARM Resource Name for network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String fabricName, String networkName, String networkMappingName) { + return deleteWithServiceResponseAsync(fabricName, networkName, networkMappingName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete network mapping. + * The operation to delete a network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName ARM Resource Name for network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String fabricName, String networkName, String networkMappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (networkName == null) { + throw new IllegalArgumentException("Parameter networkName is required and cannot be null."); + } + if (networkMappingName == null) { + throw new IllegalArgumentException("Parameter networkMappingName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, networkName, networkMappingName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete network mapping. + * The operation to delete a network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName ARM Resource Name for network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String fabricName, String networkName, String networkMappingName) { + beginDeleteWithServiceResponseAsync(fabricName, networkName, networkMappingName).toBlocking().single().body(); + } + + /** + * Delete network mapping. + * The operation to delete a network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName ARM Resource Name for network mapping. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String fabricName, String networkName, String networkMappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(fabricName, networkName, networkMappingName), serviceCallback); + } + + /** + * Delete network mapping. + * The operation to delete a network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName ARM Resource Name for network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String fabricName, String networkName, String networkMappingName) { + return beginDeleteWithServiceResponseAsync(fabricName, networkName, networkMappingName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete network mapping. + * The operation to delete a network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName ARM Resource Name for network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String fabricName, String networkName, String networkMappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (networkName == null) { + throw new IllegalArgumentException("Parameter networkName is required and cannot be null."); + } + if (networkMappingName == null) { + throw new IllegalArgumentException("Parameter networkMappingName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, networkName, networkMappingName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates network mapping. + * The operation to update an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping 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 NetworkMappingInner object if successful. + */ + public NetworkMappingInner update(String fabricName, String networkName, String networkMappingName) { + return updateWithServiceResponseAsync(fabricName, networkName, networkMappingName).toBlocking().last().body(); + } + + /** + * Updates network mapping. + * The operation to update an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String fabricName, String networkName, String networkMappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(fabricName, networkName, networkMappingName), serviceCallback); + } + + /** + * Updates network mapping. + * The operation to update an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String fabricName, String networkName, String networkMappingName) { + return updateWithServiceResponseAsync(fabricName, networkName, networkMappingName).map(new Func1, NetworkMappingInner>() { + @Override + public NetworkMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates network mapping. + * The operation to update an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String fabricName, String networkName, String networkMappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (networkName == null) { + throw new IllegalArgumentException("Parameter networkName is required and cannot be null."); + } + if (networkMappingName == null) { + throw new IllegalArgumentException("Parameter networkMappingName 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 UpdateNetworkMappingInputProperties properties = null; + UpdateNetworkMappingInput input = new UpdateNetworkMappingInput(); + input.withProperties(null); + Observable> observable = service.update(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, networkName, networkMappingName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates network mapping. + * The operation to update an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @param properties The input properties needed to update network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkMappingInner object if successful. + */ + public NetworkMappingInner update(String fabricName, String networkName, String networkMappingName, UpdateNetworkMappingInputProperties properties) { + return updateWithServiceResponseAsync(fabricName, networkName, networkMappingName, properties).toBlocking().last().body(); + } + + /** + * Updates network mapping. + * The operation to update an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @param properties The input properties needed to update network mapping. + * @param serviceCallback 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 fabricName, String networkName, String networkMappingName, UpdateNetworkMappingInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(fabricName, networkName, networkMappingName, properties), serviceCallback); + } + + /** + * Updates network mapping. + * The operation to update an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @param properties The input properties needed to update network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String fabricName, String networkName, String networkMappingName, UpdateNetworkMappingInputProperties properties) { + return updateWithServiceResponseAsync(fabricName, networkName, networkMappingName, properties).map(new Func1, NetworkMappingInner>() { + @Override + public NetworkMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates network mapping. + * The operation to update an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @param properties The input properties needed to update network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String fabricName, String networkName, String networkMappingName, UpdateNetworkMappingInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (networkName == null) { + throw new IllegalArgumentException("Parameter networkName is required and cannot be null."); + } + if (networkMappingName == null) { + throw new IllegalArgumentException("Parameter networkMappingName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + UpdateNetworkMappingInput input = new UpdateNetworkMappingInput(); + input.withProperties(properties); + Observable> observable = service.update(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, networkName, networkMappingName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates network mapping. + * The operation to update an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping 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 NetworkMappingInner object if successful. + */ + public NetworkMappingInner beginUpdate(String fabricName, String networkName, String networkMappingName) { + return beginUpdateWithServiceResponseAsync(fabricName, networkName, networkMappingName).toBlocking().single().body(); + } + + /** + * Updates network mapping. + * The operation to update an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping 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 beginUpdateAsync(String fabricName, String networkName, String networkMappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(fabricName, networkName, networkMappingName), serviceCallback); + } + + /** + * Updates network mapping. + * The operation to update an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkMappingInner object + */ + public Observable beginUpdateAsync(String fabricName, String networkName, String networkMappingName) { + return beginUpdateWithServiceResponseAsync(fabricName, networkName, networkMappingName).map(new Func1, NetworkMappingInner>() { + @Override + public NetworkMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates network mapping. + * The operation to update an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkMappingInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String fabricName, String networkName, String networkMappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (networkName == null) { + throw new IllegalArgumentException("Parameter networkName is required and cannot be null."); + } + if (networkMappingName == null) { + throw new IllegalArgumentException("Parameter networkMappingName 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 UpdateNetworkMappingInputProperties properties = null; + UpdateNetworkMappingInput input = new UpdateNetworkMappingInput(); + input.withProperties(null); + return service.beginUpdate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, networkName, networkMappingName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates network mapping. + * The operation to update an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @param properties The input properties needed to update network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkMappingInner object if successful. + */ + public NetworkMappingInner beginUpdate(String fabricName, String networkName, String networkMappingName, UpdateNetworkMappingInputProperties properties) { + return beginUpdateWithServiceResponseAsync(fabricName, networkName, networkMappingName, properties).toBlocking().single().body(); + } + + /** + * Updates network mapping. + * The operation to update an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @param properties The input properties needed to update network mapping. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAsync(String fabricName, String networkName, String networkMappingName, UpdateNetworkMappingInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(fabricName, networkName, networkMappingName, properties), serviceCallback); + } + + /** + * Updates network mapping. + * The operation to update an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @param properties The input properties needed to update network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkMappingInner object + */ + public Observable beginUpdateAsync(String fabricName, String networkName, String networkMappingName, UpdateNetworkMappingInputProperties properties) { + return beginUpdateWithServiceResponseAsync(fabricName, networkName, networkMappingName, properties).map(new Func1, NetworkMappingInner>() { + @Override + public NetworkMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates network mapping. + * The operation to update an ASR network mapping. + * + * @param fabricName Primary fabric name. + * @param networkName Primary network name. + * @param networkMappingName Network mapping name. + * @param properties The input properties needed to update network mapping. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkMappingInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String fabricName, String networkName, String networkMappingName, UpdateNetworkMappingInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (networkName == null) { + throw new IllegalArgumentException("Parameter networkName is required and cannot be null."); + } + if (networkMappingName == null) { + throw new IllegalArgumentException("Parameter networkMappingName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + UpdateNetworkMappingInput input = new UpdateNetworkMappingInput(); + input.withProperties(properties); + return service.beginUpdate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, networkName, networkMappingName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all the network mappings under a vault. + * Lists all ASR network mappings in the vault. + * + * @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<NetworkMappingInner> 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 all the network mappings under a vault. + * Lists all ASR network mappings in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback 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 all the network mappings under a vault. + * Lists all ASR network mappings in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkMappingInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the network mappings under a vault. + * Lists all ASR network mappings in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkMappingInner> 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 all the network mappings under a vault. + * Lists all ASR network mappings in the vault. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkMappingInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all the network mappings under a network. + * Lists all ASR network mappings for the specified network. + * + * @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<NetworkMappingInner> object if successful. + */ + public PagedList listByReplicationNetworksNext(final String nextPageLink) { + ServiceResponse> response = listByReplicationNetworksNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationNetworksNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the network mappings under a network. + * Lists all ASR network mappings for the specified network. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByReplicationNetworksNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationNetworksNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationNetworksNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the network mappings under a network. + * Lists all ASR network mappings for the specified network. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkMappingInner> object + */ + public Observable> listByReplicationNetworksNextAsync(final String nextPageLink) { + return listByReplicationNetworksNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the network mappings under a network. + * Lists all ASR network mappings for the specified network. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkMappingInner> object + */ + public Observable>> listByReplicationNetworksNextWithServiceResponseAsync(final String nextPageLink) { + return listByReplicationNetworksNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationNetworksNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the network mappings under a network. + * Lists all ASR network mappings for the specified network. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkMappingInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationNetworksNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByReplicationNetworksNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationNetworksNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationNetworksNextDelegate(Response response) 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationNetworksImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationNetworksImpl.java new file mode 100644 index 0000000000000..5abb92d01b270 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationNetworksImpl.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworks; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.Network; + +class ReplicationNetworksImpl extends WrapperImpl implements ReplicationNetworks { + private final RecoveryServicesManager manager; + + ReplicationNetworksImpl(RecoveryServicesManager manager) { + super(manager.inner().replicationNetworks()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + private NetworkImpl wrapModel(NetworkInner inner) { + return new NetworkImpl(inner, manager()); + } + + @Override + public Observable listByReplicationFabricsAsync(final String fabricName) { + ReplicationNetworksInner client = this.inner(); + return client.listByReplicationFabricsAsync(fabricName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Network call(NetworkInner inner) { + return new NetworkImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAsync(String fabricName, String networkName) { + ReplicationNetworksInner client = this.inner(); + return client.getAsync(fabricName, networkName) + .map(new Func1() { + @Override + public Network call(NetworkInner inner) { + return new NetworkImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAsync() { + ReplicationNetworksInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Network call(NetworkInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationNetworksInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationNetworksInner.java new file mode 100644 index 0000000000000..a94c6ddd028e4 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationNetworksInner.java @@ -0,0 +1,654 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ReplicationNetworks. + */ +public class ReplicationNetworksInner { + /** The Retrofit service to perform REST calls. */ + private ReplicationNetworksService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationNetworksInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReplicationNetworksInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(ReplicationNetworksService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReplicationNetworks to be + * used by Retrofit to perform actually REST calls. + */ + interface ReplicationNetworksService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworks list" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationNetworks") + Observable> list(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworks listByReplicationFabrics" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks") + Observable> listByReplicationFabrics(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworks get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("networkName") String networkName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworks 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.recoveryservicessiterecovery.v2018_01_10.ReplicationNetworks listByReplicationFabricsNext" }) + @GET + Observable> listByReplicationFabricsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the list of networks. View-only API. + * Lists the networks available in a vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<NetworkInner> 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 list of networks. View-only API. + * Lists the networks available in a vault. + * + * @param serviceCallback 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 list of networks. View-only API. + * Lists the networks available in a vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of networks. View-only API. + * Lists the networks available in a vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInner> 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 list of networks. View-only API. + * Lists the networks available in a vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = 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 list of networks under a fabric. + * Lists the networks available for a fabric. + * + * @param fabricName Fabric 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<NetworkInner> object if successful. + */ + public PagedList listByReplicationFabrics(final String fabricName) { + ServiceResponse> response = listByReplicationFabricsSinglePageAsync(fabricName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of networks under a fabric. + * Lists the networks available for a fabric. + * + * @param fabricName Fabric 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> listByReplicationFabricsAsync(final String fabricName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationFabricsSinglePageAsync(fabricName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of networks under a fabric. + * Lists the networks available for a fabric. + * + * @param fabricName Fabric name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInner> object + */ + public Observable> listByReplicationFabricsAsync(final String fabricName) { + return listByReplicationFabricsWithServiceResponseAsync(fabricName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of networks under a fabric. + * Lists the networks available for a fabric. + * + * @param fabricName Fabric name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInner> object + */ + public Observable>> listByReplicationFabricsWithServiceResponseAsync(final String fabricName) { + return listByReplicationFabricsSinglePageAsync(fabricName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationFabricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of networks under a fabric. + * Lists the networks available for a fabric. + * + ServiceResponse> * @param fabricName Fabric name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationFabricsSinglePageAsync(final String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByReplicationFabrics(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationFabricsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationFabricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a network with specified server id and network name. + * Gets the details of a network. + * + * @param fabricName Server Id. + * @param networkName Primary network 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 NetworkInner object if successful. + */ + public NetworkInner get(String fabricName, String networkName) { + return getWithServiceResponseAsync(fabricName, networkName).toBlocking().single().body(); + } + + /** + * Gets a network with specified server id and network name. + * Gets the details of a network. + * + * @param fabricName Server Id. + * @param networkName Primary network 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 getAsync(String fabricName, String networkName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(fabricName, networkName), serviceCallback); + } + + /** + * Gets a network with specified server id and network name. + * Gets the details of a network. + * + * @param fabricName Server Id. + * @param networkName Primary network name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInner object + */ + public Observable getAsync(String fabricName, String networkName) { + return getWithServiceResponseAsync(fabricName, networkName).map(new Func1, NetworkInner>() { + @Override + public NetworkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a network with specified server id and network name. + * Gets the details of a network. + * + * @param fabricName Server Id. + * @param networkName Primary network name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInner object + */ + public Observable> getWithServiceResponseAsync(String fabricName, String networkName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (networkName == null) { + throw new IllegalArgumentException("Parameter networkName is required 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(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, networkName, 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); + } + + /** + * Gets the list of networks. View-only API. + * Lists the networks available in a vault. + * + * @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<NetworkInner> 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 list of networks. View-only API. + * Lists the networks available in a vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback 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 list of networks. View-only API. + * Lists the networks available in a vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInner> 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 list of networks. View-only API. + * Lists the networks available in a vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInner> 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 list of networks. View-only API. + * Lists the networks available in a vault. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInner> 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 list of networks under a fabric. + * Lists the networks available for a fabric. + * + * @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<NetworkInner> object if successful. + */ + public PagedList listByReplicationFabricsNext(final String nextPageLink) { + ServiceResponse> response = listByReplicationFabricsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of networks under a fabric. + * Lists the networks available for a fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByReplicationFabricsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationFabricsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of networks under a fabric. + * Lists the networks available for a fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInner> object + */ + public Observable> listByReplicationFabricsNextAsync(final String nextPageLink) { + return listByReplicationFabricsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of networks under a fabric. + * Lists the networks available for a fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInner> object + */ + public Observable>> listByReplicationFabricsNextWithServiceResponseAsync(final String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationFabricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of networks under a fabric. + * Lists the networks available for a fabric. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationFabricsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByReplicationFabricsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationFabricsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationFabricsNextDelegate(Response response) 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationPoliciesImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationPoliciesImpl.java new file mode 100644 index 0000000000000..9a7a86ebca866 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationPoliciesImpl.java @@ -0,0 +1,81 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationPolicies; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.Policy; + +class ReplicationPoliciesImpl extends WrapperImpl implements ReplicationPolicies { + private final RecoveryServicesManager manager; + + ReplicationPoliciesImpl(RecoveryServicesManager manager) { + super(manager.inner().replicationPolicies()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public PolicyImpl define(String name) { + return wrapModel(name); + } + + private PolicyImpl wrapModel(PolicyInner inner) { + return new PolicyImpl(inner, manager()); + } + + private PolicyImpl wrapModel(String name) { + return new PolicyImpl(name, this.manager()); + } + + @Override + public Observable listAsync() { + ReplicationPoliciesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Policy call(PolicyInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String policyName) { + ReplicationPoliciesInner client = this.inner(); + return client.getAsync(policyName) + .map(new Func1() { + @Override + public Policy call(PolicyInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String policyName) { + ReplicationPoliciesInner client = this.inner(); + return client.deleteAsync(policyName).toCompletable(); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationPoliciesInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationPoliciesInner.java new file mode 100644 index 0000000000000..1eed69b726c25 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationPoliciesInner.java @@ -0,0 +1,1260 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.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.management.recoveryservicessiterecovery.v2018_01_10.CreatePolicyInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.CreatePolicyInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.UpdatePolicyInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.UpdatePolicyInputProperties; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ReplicationPolicies. + */ +public class ReplicationPoliciesInner { + /** The Retrofit service to perform REST calls. */ + private ReplicationPoliciesService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationPoliciesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReplicationPoliciesInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(ReplicationPoliciesService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReplicationPolicies to be + * used by Retrofit to perform actually REST calls. + */ + interface ReplicationPoliciesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationPolicies get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("policyName") String policyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationPolicies create" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}") + Observable> create(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("policyName") String policyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CreatePolicyInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationPolicies beginCreate" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}") + Observable> beginCreate(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("policyName") String policyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CreatePolicyInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationPolicies delete" }) + @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("policyName") String policyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationPolicies beginDelete" }) + @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("policyName") String policyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationPolicies update" }) + @PATCH("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}") + Observable> update(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("policyName") String policyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UpdatePolicyInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationPolicies beginUpdate" }) + @PATCH("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}") + Observable> beginUpdate(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("policyName") String policyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UpdatePolicyInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationPolicies list" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies") + Observable> list(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationPolicies listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the requested policy. + * Gets the details of a replication policy. + * + * @param policyName Replication policy 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 PolicyInner object if successful. + */ + public PolicyInner get(String policyName) { + return getWithServiceResponseAsync(policyName).toBlocking().single().body(); + } + + /** + * Gets the requested policy. + * Gets the details of a replication policy. + * + * @param policyName Replication policy 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 getAsync(String policyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(policyName), serviceCallback); + } + + /** + * Gets the requested policy. + * Gets the details of a replication policy. + * + * @param policyName Replication policy name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PolicyInner object + */ + public Observable getAsync(String policyName) { + return getWithServiceResponseAsync(policyName).map(new Func1, PolicyInner>() { + @Override + public PolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the requested policy. + * Gets the details of a replication policy. + * + * @param policyName Replication policy name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PolicyInner object + */ + public Observable> getWithServiceResponseAsync(String policyName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (policyName == null) { + throw new IllegalArgumentException("Parameter policyName is required 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(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), policyName, 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); + } + + /** + * Creates the policy. + * The operation to create a replication policy. + * + * @param policyName Replication policy 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 PolicyInner object if successful. + */ + public PolicyInner create(String policyName) { + return createWithServiceResponseAsync(policyName).toBlocking().last().body(); + } + + /** + * Creates the policy. + * The operation to create a replication policy. + * + * @param policyName Replication policy 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 createAsync(String policyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(policyName), serviceCallback); + } + + /** + * Creates the policy. + * The operation to create a replication policy. + * + * @param policyName Replication policy name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String policyName) { + return createWithServiceResponseAsync(policyName).map(new Func1, PolicyInner>() { + @Override + public PolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates the policy. + * The operation to create a replication policy. + * + * @param policyName Replication policy name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String policyName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (policyName == null) { + throw new IllegalArgumentException("Parameter policyName 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 CreatePolicyInputProperties properties = null; + CreatePolicyInput input = new CreatePolicyInput(); + input.withProperties(null); + Observable> observable = service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), policyName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Creates the policy. + * The operation to create a replication policy. + * + * @param policyName Replication policy name + * @param properties Policy creation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PolicyInner object if successful. + */ + public PolicyInner create(String policyName, CreatePolicyInputProperties properties) { + return createWithServiceResponseAsync(policyName, properties).toBlocking().last().body(); + } + + /** + * Creates the policy. + * The operation to create a replication policy. + * + * @param policyName Replication policy name + * @param properties Policy creation properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String policyName, CreatePolicyInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(policyName, properties), serviceCallback); + } + + /** + * Creates the policy. + * The operation to create a replication policy. + * + * @param policyName Replication policy name + * @param properties Policy creation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String policyName, CreatePolicyInputProperties properties) { + return createWithServiceResponseAsync(policyName, properties).map(new Func1, PolicyInner>() { + @Override + public PolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates the policy. + * The operation to create a replication policy. + * + * @param policyName Replication policy name + * @param properties Policy creation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String policyName, CreatePolicyInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (policyName == null) { + throw new IllegalArgumentException("Parameter policyName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + CreatePolicyInput input = new CreatePolicyInput(); + input.withProperties(properties); + Observable> observable = service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), policyName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates the policy. + * The operation to create a replication policy. + * + * @param policyName Replication policy 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 PolicyInner object if successful. + */ + public PolicyInner beginCreate(String policyName) { + return beginCreateWithServiceResponseAsync(policyName).toBlocking().single().body(); + } + + /** + * Creates the policy. + * The operation to create a replication policy. + * + * @param policyName Replication policy 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 beginCreateAsync(String policyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(policyName), serviceCallback); + } + + /** + * Creates the policy. + * The operation to create a replication policy. + * + * @param policyName Replication policy name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PolicyInner object + */ + public Observable beginCreateAsync(String policyName) { + return beginCreateWithServiceResponseAsync(policyName).map(new Func1, PolicyInner>() { + @Override + public PolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates the policy. + * The operation to create a replication policy. + * + * @param policyName Replication policy name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PolicyInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String policyName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (policyName == null) { + throw new IllegalArgumentException("Parameter policyName 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 CreatePolicyInputProperties properties = null; + CreatePolicyInput input = new CreatePolicyInput(); + input.withProperties(null); + return service.beginCreate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), policyName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Creates the policy. + * The operation to create a replication policy. + * + * @param policyName Replication policy name + * @param properties Policy creation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PolicyInner object if successful. + */ + public PolicyInner beginCreate(String policyName, CreatePolicyInputProperties properties) { + return beginCreateWithServiceResponseAsync(policyName, properties).toBlocking().single().body(); + } + + /** + * Creates the policy. + * The operation to create a replication policy. + * + * @param policyName Replication policy name + * @param properties Policy creation properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String policyName, CreatePolicyInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(policyName, properties), serviceCallback); + } + + /** + * Creates the policy. + * The operation to create a replication policy. + * + * @param policyName Replication policy name + * @param properties Policy creation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PolicyInner object + */ + public Observable beginCreateAsync(String policyName, CreatePolicyInputProperties properties) { + return beginCreateWithServiceResponseAsync(policyName, properties).map(new Func1, PolicyInner>() { + @Override + public PolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates the policy. + * The operation to create a replication policy. + * + * @param policyName Replication policy name + * @param properties Policy creation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PolicyInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String policyName, CreatePolicyInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (policyName == null) { + throw new IllegalArgumentException("Parameter policyName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + CreatePolicyInput input = new CreatePolicyInput(); + input.withProperties(properties); + return service.beginCreate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), policyName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete the policy. + * The operation to delete a replication policy. + * + * @param policyName Replication policy name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String policyName) { + deleteWithServiceResponseAsync(policyName).toBlocking().last().body(); + } + + /** + * Delete the policy. + * The operation to delete a replication policy. + * + * @param policyName Replication policy 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 deleteAsync(String policyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(policyName), serviceCallback); + } + + /** + * Delete the policy. + * The operation to delete a replication policy. + * + * @param policyName Replication policy name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String policyName) { + return deleteWithServiceResponseAsync(policyName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete the policy. + * The operation to delete a replication policy. + * + * @param policyName Replication policy name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String policyName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (policyName == null) { + throw new IllegalArgumentException("Parameter policyName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), policyName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete the policy. + * The operation to delete a replication policy. + * + * @param policyName Replication policy name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String policyName) { + beginDeleteWithServiceResponseAsync(policyName).toBlocking().single().body(); + } + + /** + * Delete the policy. + * The operation to delete a replication policy. + * + * @param policyName Replication policy 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 beginDeleteAsync(String policyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(policyName), serviceCallback); + } + + /** + * Delete the policy. + * The operation to delete a replication policy. + * + * @param policyName Replication policy name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String policyName) { + return beginDeleteWithServiceResponseAsync(policyName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete the policy. + * The operation to delete a replication policy. + * + * @param policyName Replication policy name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String policyName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (policyName == null) { + throw new IllegalArgumentException("Parameter policyName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), policyName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the protection profile. + * The operation to update a replication policy. + * + * @param policyName Protection profile 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 PolicyInner object if successful. + */ + public PolicyInner update(String policyName) { + return updateWithServiceResponseAsync(policyName).toBlocking().last().body(); + } + + /** + * Updates the protection profile. + * The operation to update a replication policy. + * + * @param policyName Protection profile 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 updateAsync(String policyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(policyName), serviceCallback); + } + + /** + * Updates the protection profile. + * The operation to update a replication policy. + * + * @param policyName Protection profile Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String policyName) { + return updateWithServiceResponseAsync(policyName).map(new Func1, PolicyInner>() { + @Override + public PolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the protection profile. + * The operation to update a replication policy. + * + * @param policyName Protection profile Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String policyName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (policyName == null) { + throw new IllegalArgumentException("Parameter policyName 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 UpdatePolicyInputProperties properties = null; + UpdatePolicyInput input = new UpdatePolicyInput(); + input.withProperties(null); + Observable> observable = service.update(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), policyName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates the protection profile. + * The operation to update a replication policy. + * + * @param policyName Protection profile Id. + * @param properties The ReplicationProviderSettings. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PolicyInner object if successful. + */ + public PolicyInner update(String policyName, UpdatePolicyInputProperties properties) { + return updateWithServiceResponseAsync(policyName, properties).toBlocking().last().body(); + } + + /** + * Updates the protection profile. + * The operation to update a replication policy. + * + * @param policyName Protection profile Id. + * @param properties The ReplicationProviderSettings. + * @param serviceCallback 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 policyName, UpdatePolicyInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(policyName, properties), serviceCallback); + } + + /** + * Updates the protection profile. + * The operation to update a replication policy. + * + * @param policyName Protection profile Id. + * @param properties The ReplicationProviderSettings. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String policyName, UpdatePolicyInputProperties properties) { + return updateWithServiceResponseAsync(policyName, properties).map(new Func1, PolicyInner>() { + @Override + public PolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the protection profile. + * The operation to update a replication policy. + * + * @param policyName Protection profile Id. + * @param properties The ReplicationProviderSettings. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String policyName, UpdatePolicyInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (policyName == null) { + throw new IllegalArgumentException("Parameter policyName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + UpdatePolicyInput input = new UpdatePolicyInput(); + input.withProperties(properties); + Observable> observable = service.update(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), policyName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates the protection profile. + * The operation to update a replication policy. + * + * @param policyName Protection profile 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 PolicyInner object if successful. + */ + public PolicyInner beginUpdate(String policyName) { + return beginUpdateWithServiceResponseAsync(policyName).toBlocking().single().body(); + } + + /** + * Updates the protection profile. + * The operation to update a replication policy. + * + * @param policyName Protection profile 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 beginUpdateAsync(String policyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(policyName), serviceCallback); + } + + /** + * Updates the protection profile. + * The operation to update a replication policy. + * + * @param policyName Protection profile Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PolicyInner object + */ + public Observable beginUpdateAsync(String policyName) { + return beginUpdateWithServiceResponseAsync(policyName).map(new Func1, PolicyInner>() { + @Override + public PolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the protection profile. + * The operation to update a replication policy. + * + * @param policyName Protection profile Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PolicyInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String policyName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (policyName == null) { + throw new IllegalArgumentException("Parameter policyName 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 UpdatePolicyInputProperties properties = null; + UpdatePolicyInput input = new UpdatePolicyInput(); + input.withProperties(null); + return service.beginUpdate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), policyName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates the protection profile. + * The operation to update a replication policy. + * + * @param policyName Protection profile Id. + * @param properties The ReplicationProviderSettings. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PolicyInner object if successful. + */ + public PolicyInner beginUpdate(String policyName, UpdatePolicyInputProperties properties) { + return beginUpdateWithServiceResponseAsync(policyName, properties).toBlocking().single().body(); + } + + /** + * Updates the protection profile. + * The operation to update a replication policy. + * + * @param policyName Protection profile Id. + * @param properties The ReplicationProviderSettings. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAsync(String policyName, UpdatePolicyInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(policyName, properties), serviceCallback); + } + + /** + * Updates the protection profile. + * The operation to update a replication policy. + * + * @param policyName Protection profile Id. + * @param properties The ReplicationProviderSettings. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PolicyInner object + */ + public Observable beginUpdateAsync(String policyName, UpdatePolicyInputProperties properties) { + return beginUpdateWithServiceResponseAsync(policyName, properties).map(new Func1, PolicyInner>() { + @Override + public PolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the protection profile. + * The operation to update a replication policy. + * + * @param policyName Protection profile Id. + * @param properties The ReplicationProviderSettings. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PolicyInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String policyName, UpdatePolicyInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (policyName == null) { + throw new IllegalArgumentException("Parameter policyName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + UpdatePolicyInput input = new UpdatePolicyInput(); + input.withProperties(properties); + return service.beginUpdate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), policyName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the list of replication policies. + * Lists the replication policies for a vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PolicyInner> 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 list of replication policies. + * Lists the replication policies for a vault. + * + * @param serviceCallback 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 list of replication policies. + * Lists the replication policies for a vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PolicyInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of replication policies. + * Lists the replication policies for a vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PolicyInner> 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 list of replication policies. + * Lists the replication policies for a vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PolicyInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = 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 list of replication policies. + * Lists the replication policies for a vault. + * + * @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<PolicyInner> 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 list of replication policies. + * Lists the replication policies for a vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback 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 list of replication policies. + * Lists the replication policies for a vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PolicyInner> 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 list of replication policies. + * Lists the replication policies for a vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PolicyInner> 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 list of replication policies. + * Lists the replication policies for a vault. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PolicyInner> 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectableItemsImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectableItemsImpl.java new file mode 100644 index 0000000000000..0cb6ede34d1e6 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectableItemsImpl.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectableItems; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ProtectableItem; + +class ReplicationProtectableItemsImpl extends WrapperImpl implements ReplicationProtectableItems { + private final RecoveryServicesManager manager; + + ReplicationProtectableItemsImpl(RecoveryServicesManager manager) { + super(manager.inner().replicationProtectableItems()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + private ProtectableItemImpl wrapModel(ProtectableItemInner inner) { + return new ProtectableItemImpl(inner, manager()); + } + + @Override + public Observable listByReplicationProtectionContainersAsync(final String fabricName, final String protectionContainerName) { + ReplicationProtectableItemsInner client = this.inner(); + return client.listByReplicationProtectionContainersAsync(fabricName, protectionContainerName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProtectableItem call(ProtectableItemInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String fabricName, String protectionContainerName, String protectableItemName) { + ReplicationProtectableItemsInner client = this.inner(); + return client.getAsync(fabricName, protectionContainerName, protectableItemName) + .map(new Func1() { + @Override + public ProtectableItem call(ProtectableItemInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectableItemsInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectableItemsInner.java new file mode 100644 index 0000000000000..63d3dc3d4f047 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectableItemsInner.java @@ -0,0 +1,427 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ReplicationProtectableItems. + */ +public class ReplicationProtectableItemsInner { + /** The Retrofit service to perform REST calls. */ + private ReplicationProtectableItemsService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationProtectableItemsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReplicationProtectableItemsInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(ReplicationProtectableItemsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReplicationProtectableItems to be + * used by Retrofit to perform actually REST calls. + */ + interface ReplicationProtectableItemsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectableItems get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectableItems/{protectableItemName}") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("protectableItemName") String protectableItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectableItems listByReplicationProtectionContainers" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectableItems") + Observable> listByReplicationProtectionContainers(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectableItems listByReplicationProtectionContainersNext" }) + @GET + Observable> listByReplicationProtectionContainersNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the details of a protectable item. + * The operation to get the details of a protectable item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param protectableItemName Protectable item 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 ProtectableItemInner object if successful. + */ + public ProtectableItemInner get(String fabricName, String protectionContainerName, String protectableItemName) { + return getWithServiceResponseAsync(fabricName, protectionContainerName, protectableItemName).toBlocking().single().body(); + } + + /** + * Gets the details of a protectable item. + * The operation to get the details of a protectable item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param protectableItemName Protectable item 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 getAsync(String fabricName, String protectionContainerName, String protectableItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(fabricName, protectionContainerName, protectableItemName), serviceCallback); + } + + /** + * Gets the details of a protectable item. + * The operation to get the details of a protectable item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param protectableItemName Protectable item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectableItemInner object + */ + public Observable getAsync(String fabricName, String protectionContainerName, String protectableItemName) { + return getWithServiceResponseAsync(fabricName, protectionContainerName, protectableItemName).map(new Func1, ProtectableItemInner>() { + @Override + public ProtectableItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the details of a protectable item. + * The operation to get the details of a protectable item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param protectableItemName Protectable item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectableItemInner object + */ + public Observable> getWithServiceResponseAsync(String fabricName, String protectionContainerName, String protectableItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (protectableItemName == null) { + throw new IllegalArgumentException("Parameter protectableItemName is required 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(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, protectableItemName, 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); + } + + /** + * Gets the list of protectable items. + * Lists the protectable items in a protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container 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<ProtectableItemInner> object if successful. + */ + public PagedList listByReplicationProtectionContainers(final String fabricName, final String protectionContainerName) { + ServiceResponse> response = listByReplicationProtectionContainersSinglePageAsync(fabricName, protectionContainerName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of protectable items. + * Lists the protectable items in a protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container 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> listByReplicationProtectionContainersAsync(final String fabricName, final String protectionContainerName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationProtectionContainersSinglePageAsync(fabricName, protectionContainerName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of protectable items. + * Lists the protectable items in a protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectableItemInner> object + */ + public Observable> listByReplicationProtectionContainersAsync(final String fabricName, final String protectionContainerName) { + return listByReplicationProtectionContainersWithServiceResponseAsync(fabricName, protectionContainerName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of protectable items. + * Lists the protectable items in a protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectableItemInner> object + */ + public Observable>> listByReplicationProtectionContainersWithServiceResponseAsync(final String fabricName, final String protectionContainerName) { + return listByReplicationProtectionContainersSinglePageAsync(fabricName, protectionContainerName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationProtectionContainersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of protectable items. + * Lists the protectable items in a protection container. + * + ServiceResponse> * @param fabricName Fabric name. + ServiceResponse> * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProtectableItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationProtectionContainersSinglePageAsync(final String fabricName, final String protectionContainerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByReplicationProtectionContainers(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationProtectionContainersDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationProtectionContainersDelegate(Response response) 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 list of protectable items. + * Lists the protectable items in a protection container. + * + * @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<ProtectableItemInner> object if successful. + */ + public PagedList listByReplicationProtectionContainersNext(final String nextPageLink) { + ServiceResponse> response = listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of protectable items. + * Lists the protectable items in a protection container. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByReplicationProtectionContainersNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of protectable items. + * Lists the protectable items in a protection container. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectableItemInner> object + */ + public Observable> listByReplicationProtectionContainersNextAsync(final String nextPageLink) { + return listByReplicationProtectionContainersNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of protectable items. + * Lists the protectable items in a protection container. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectableItemInner> object + */ + public Observable>> listByReplicationProtectionContainersNextWithServiceResponseAsync(final String nextPageLink) { + return listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationProtectionContainersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of protectable items. + * Lists the protectable items in a protection container. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProtectableItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationProtectionContainersNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByReplicationProtectionContainersNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationProtectionContainersNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationProtectionContainersNextDelegate(Response response) 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectedItemImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectedItemImpl.java new file mode 100644 index 0000000000000..c66a310df3a3c --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectedItemImpl.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItem; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItemProperties; + +class ReplicationProtectedItemImpl extends CreatableUpdatableImpl implements ReplicationProtectedItem, ReplicationProtectedItem.Definition, ReplicationProtectedItem.Update { + private final RecoveryServicesManager manager; + private String fabricName; + private String protectionContainerName; + private String replicatedProtectedItemName; + + ReplicationProtectedItemImpl(String name, RecoveryServicesManager manager) { + super(name, new ReplicationProtectedItemInner()); + this.manager = manager; + // Set resource name + this.replicatedProtectedItemName = name; + // + } + + ReplicationProtectedItemImpl(ReplicationProtectedItemInner inner, RecoveryServicesManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.replicatedProtectedItemName = inner.name(); + // resource ancestor names + this.fabricName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationFabrics"); + this.protectionContainerName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationProtectionContainers"); + this.replicatedProtectedItemName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationProtectedItems"); + // + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ReplicationProtectedItemsInner client = this.manager().inner().replicationProtectedItems(); + return client.createAsync(this.fabricName, this.protectionContainerName, this.replicatedProtectedItemName) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ReplicationProtectedItemsInner client = this.manager().inner().replicationProtectedItems(); + return client.updateAsync(this.fabricName, this.protectionContainerName, this.replicatedProtectedItemName) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ReplicationProtectedItemsInner client = this.manager().inner().replicationProtectedItems(); + return client.getAsync(this.fabricName, this.protectionContainerName, this.replicatedProtectedItemName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ReplicationProtectedItemProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ReplicationProtectedItemImpl withExistingReplicationProtectionContainer(String fabricName, String protectionContainerName) { + this.fabricName = fabricName; + this.protectionContainerName = protectionContainerName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectedItemInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectedItemInner.java new file mode 100644 index 0000000000000..aa5fe4ee8a9c3 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectedItemInner.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItemProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Replication protected item. + */ +public class ReplicationProtectedItemInner extends ProxyResource { + /** + * The custom data. + */ + @JsonProperty(value = "properties") + private ReplicationProtectedItemProperties properties; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get the custom data. + * + * @return the properties value + */ + public ReplicationProtectedItemProperties properties() { + return this.properties; + } + + /** + * Set the custom data. + * + * @param properties the properties value to set + * @return the ReplicationProtectedItemInner object itself. + */ + public ReplicationProtectedItemInner withProperties(ReplicationProtectedItemProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the ReplicationProtectedItemInner object itself. + */ + public ReplicationProtectedItemInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectedItemsImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectedItemsImpl.java new file mode 100644 index 0000000000000..dee47b3743204 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectedItemsImpl.java @@ -0,0 +1,214 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItem; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.TestFailoverCleanupInputProperties; + +class ReplicationProtectedItemsImpl extends WrapperImpl implements ReplicationProtectedItems { + private final RecoveryServicesManager manager; + + ReplicationProtectedItemsImpl(RecoveryServicesManager manager) { + super(manager.inner().replicationProtectedItems()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public ReplicationProtectedItemImpl define(String name) { + return wrapModel(name); + } + + private ReplicationProtectedItemImpl wrapModel(ReplicationProtectedItemInner inner) { + return new ReplicationProtectedItemImpl(inner, manager()); + } + + private ReplicationProtectedItemImpl wrapModel(String name) { + return new ReplicationProtectedItemImpl(name, this.manager()); + } + + @Override + public Observable listAsync() { + ReplicationProtectedItemsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ReplicationProtectedItem call(ReplicationProtectedItemInner inner) { + return new ReplicationProtectedItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable applyRecoveryPointAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + ReplicationProtectedItemsInner client = this.inner(); + return client.applyRecoveryPointAsync(fabricName, protectionContainerName, replicatedProtectedItemName) + .map(new Func1() { + @Override + public ReplicationProtectedItem call(ReplicationProtectedItemInner inner) { + return new ReplicationProtectedItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable repairReplicationAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + ReplicationProtectedItemsInner client = this.inner(); + return client.repairReplicationAsync(fabricName, protectionContainerName, replicatedProtectedItemName) + .map(new Func1() { + @Override + public ReplicationProtectedItem call(ReplicationProtectedItemInner inner) { + return new ReplicationProtectedItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateMobilityServiceAsync(String fabricName, String protectionContainerName, String replicationProtectedItemName) { + ReplicationProtectedItemsInner client = this.inner(); + return client.updateMobilityServiceAsync(fabricName, protectionContainerName, replicationProtectedItemName) + .map(new Func1() { + @Override + public ReplicationProtectedItem call(ReplicationProtectedItemInner inner) { + return new ReplicationProtectedItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable reprotectAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + ReplicationProtectedItemsInner client = this.inner(); + return client.reprotectAsync(fabricName, protectionContainerName, replicatedProtectedItemName) + .map(new Func1() { + @Override + public ReplicationProtectedItem call(ReplicationProtectedItemInner inner) { + return new ReplicationProtectedItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable failoverCommitAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + ReplicationProtectedItemsInner client = this.inner(); + return client.failoverCommitAsync(fabricName, protectionContainerName, replicatedProtectedItemName) + .map(new Func1() { + @Override + public ReplicationProtectedItem call(ReplicationProtectedItemInner inner) { + return new ReplicationProtectedItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable testFailoverCleanupAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, TestFailoverCleanupInputProperties properties) { + ReplicationProtectedItemsInner client = this.inner(); + return client.testFailoverCleanupAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties) + .map(new Func1() { + @Override + public ReplicationProtectedItem call(ReplicationProtectedItemInner inner) { + return new ReplicationProtectedItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable testFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + ReplicationProtectedItemsInner client = this.inner(); + return client.testFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName) + .map(new Func1() { + @Override + public ReplicationProtectedItem call(ReplicationProtectedItemInner inner) { + return new ReplicationProtectedItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable unplannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + ReplicationProtectedItemsInner client = this.inner(); + return client.unplannedFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName) + .map(new Func1() { + @Override + public ReplicationProtectedItem call(ReplicationProtectedItemInner inner) { + return new ReplicationProtectedItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable plannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + ReplicationProtectedItemsInner client = this.inner(); + return client.plannedFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName) + .map(new Func1() { + @Override + public ReplicationProtectedItem call(ReplicationProtectedItemInner inner) { + return new ReplicationProtectedItemImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + ReplicationProtectedItemsInner client = this.inner(); + return client.deleteAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toCompletable(); + } + + @Override + public Observable listByReplicationProtectionContainersAsync(final String fabricName, final String protectionContainerName) { + ReplicationProtectedItemsInner client = this.inner(); + return client.listByReplicationProtectionContainersAsync(fabricName, protectionContainerName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ReplicationProtectedItem call(ReplicationProtectedItemInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + ReplicationProtectedItemsInner client = this.inner(); + return client.getAsync(fabricName, protectionContainerName, replicatedProtectedItemName) + .map(new Func1() { + @Override + public ReplicationProtectedItem call(ReplicationProtectedItemInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable purgeAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + ReplicationProtectedItemsInner client = this.inner(); + return client.purgeAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toCompletable(); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectedItemsInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectedItemsInner.java new file mode 100644 index 0000000000000..2901a95742ebf --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectedItemsInner.java @@ -0,0 +1,5215 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.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.management.recoveryservicessiterecovery.v2018_01_10.ApplyRecoveryPointInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ApplyRecoveryPointInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.DisableProtectionInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.DisableProtectionInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.EnableProtectionInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.EnableProtectionInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.PlannedFailoverInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.PlannedFailoverInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReverseReplicationInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReverseReplicationInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.TestFailoverCleanupInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.TestFailoverCleanupInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.TestFailoverInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.TestFailoverInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.UnplannedFailoverInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.UnplannedFailoverInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.UpdateMobilityServiceRequest; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.UpdateMobilityServiceRequestProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.UpdateReplicationProtectedItemInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.UpdateReplicationProtectedItemInputProperties; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ReplicationProtectedItems. + */ +public class ReplicationProtectedItemsInner { + /** The Retrofit service to perform REST calls. */ + private ReplicationProtectedItemsService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationProtectedItemsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReplicationProtectedItemsInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(ReplicationProtectedItemsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReplicationProtectedItems to be + * used by Retrofit to perform actually REST calls. + */ + interface ReplicationProtectedItemsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems listByReplicationProtectionContainers" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems") + Observable> listByReplicationProtectionContainers(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems list" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectedItems") + Observable> list(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("skipToken") String skipToken, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems applyRecoveryPoint" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/applyRecoveryPoint") + Observable> applyRecoveryPoint(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ApplyRecoveryPointInput applyRecoveryPointInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems beginApplyRecoveryPoint" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/applyRecoveryPoint") + Observable> beginApplyRecoveryPoint(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ApplyRecoveryPointInput applyRecoveryPointInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems repairReplication" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/repairReplication") + Observable> repairReplication(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems beginRepairReplication" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/repairReplication") + Observable> beginRepairReplication(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems updateMobilityService" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicationProtectedItemName}/updateMobilityService") + Observable> updateMobilityService(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicationProtectedItemName") String replicationProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UpdateMobilityServiceRequest updateMobilityServiceRequest, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems beginUpdateMobilityService" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicationProtectedItemName}/updateMobilityService") + Observable> beginUpdateMobilityService(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicationProtectedItemName") String replicationProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UpdateMobilityServiceRequest updateMobilityServiceRequest, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems reprotect" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/reProtect") + Observable> reprotect(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ReverseReplicationInput rrInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems beginReprotect" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/reProtect") + Observable> beginReprotect(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ReverseReplicationInput rrInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems failoverCommit" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/failoverCommit") + Observable> failoverCommit(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems beginFailoverCommit" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/failoverCommit") + Observable> beginFailoverCommit(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems testFailoverCleanup" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailoverCleanup") + Observable> testFailoverCleanup(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TestFailoverCleanupInput cleanupInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems beginTestFailoverCleanup" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailoverCleanup") + Observable> beginTestFailoverCleanup(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TestFailoverCleanupInput cleanupInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems testFailover" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailover") + Observable> testFailover(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TestFailoverInput failoverInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems beginTestFailover" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailover") + Observable> beginTestFailover(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TestFailoverInput failoverInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems unplannedFailover" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/unplannedFailover") + Observable> unplannedFailover(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UnplannedFailoverInput failoverInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems beginUnplannedFailover" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/unplannedFailover") + Observable> beginUnplannedFailover(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UnplannedFailoverInput failoverInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems plannedFailover" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/plannedFailover") + Observable> plannedFailover(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body PlannedFailoverInput failoverInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems beginPlannedFailover" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/plannedFailover") + Observable> beginPlannedFailover(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body PlannedFailoverInput failoverInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems delete" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/remove") + Observable> delete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DisableProtectionInput disableProtectionInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems beginDelete" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/remove") + Observable> beginDelete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DisableProtectionInput disableProtectionInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems create" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}") + Observable> create(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body EnableProtectionInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems beginCreate" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}") + Observable> beginCreate(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body EnableProtectionInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems purge" }) + @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}", method = "DELETE", hasBody = true) + Observable> purge(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems beginPurge" }) + @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}", method = "DELETE", hasBody = true) + Observable> beginPurge(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems update" }) + @PATCH("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}") + Observable> update(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UpdateReplicationProtectedItemInput updateProtectionInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems beginUpdate" }) + @PATCH("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}") + Observable> beginUpdate(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("replicatedProtectedItemName") String replicatedProtectedItemName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UpdateReplicationProtectedItemInput updateProtectionInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems listByReplicationProtectionContainersNext" }) + @GET + Observable> listByReplicationProtectionContainersNext(@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.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectedItems listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the list of Replication protected items. + * Gets the list of ASR replication protected items in the protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container 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<ReplicationProtectedItemInner> object if successful. + */ + public PagedList listByReplicationProtectionContainers(final String fabricName, final String protectionContainerName) { + ServiceResponse> response = listByReplicationProtectionContainersSinglePageAsync(fabricName, protectionContainerName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of Replication protected items. + * Gets the list of ASR replication protected items in the protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container 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> listByReplicationProtectionContainersAsync(final String fabricName, final String protectionContainerName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationProtectionContainersSinglePageAsync(fabricName, protectionContainerName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of Replication protected items. + * Gets the list of ASR replication protected items in the protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ReplicationProtectedItemInner> object + */ + public Observable> listByReplicationProtectionContainersAsync(final String fabricName, final String protectionContainerName) { + return listByReplicationProtectionContainersWithServiceResponseAsync(fabricName, protectionContainerName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of Replication protected items. + * Gets the list of ASR replication protected items in the protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ReplicationProtectedItemInner> object + */ + public Observable>> listByReplicationProtectionContainersWithServiceResponseAsync(final String fabricName, final String protectionContainerName) { + return listByReplicationProtectionContainersSinglePageAsync(fabricName, protectionContainerName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationProtectionContainersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of Replication protected items. + * Gets the list of ASR replication protected items in the protection container. + * + ServiceResponse> * @param fabricName Fabric name. + ServiceResponse> * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ReplicationProtectedItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationProtectionContainersSinglePageAsync(final String fabricName, final String protectionContainerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByReplicationProtectionContainers(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationProtectionContainersDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationProtectionContainersDelegate(Response response) 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 list of replication protected items. + * Gets the list of ASR replication protected items in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ReplicationProtectedItemInner> 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 list of replication protected items. + * Gets the list of ASR replication protected items in the vault. + * + * @param serviceCallback 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 list of replication protected items. + * Gets the list of ASR replication protected items in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ReplicationProtectedItemInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of replication protected items. + * Gets the list of ASR replication protected items in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ReplicationProtectedItemInner> 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 list of replication protected items. + * Gets the list of ASR replication protected items in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ReplicationProtectedItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String skipToken = null; + final String filter = null; + return service.list(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), skipToken, filter, 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 list of replication protected items. + * Gets the list of ASR replication protected items in the vault. + * + * @param skipToken The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null + * @param filter OData filter options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ReplicationProtectedItemInner> object if successful. + */ + public PagedList list(final String skipToken, final String filter) { + ServiceResponse> response = listSinglePageAsync(skipToken, filter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of replication protected items. + * Gets the list of ASR replication protected items in the vault. + * + * @param skipToken The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null + * @param filter OData filter options. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String skipToken, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(skipToken, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of replication protected items. + * Gets the list of ASR replication protected items in the vault. + * + * @param skipToken The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null + * @param filter OData filter options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ReplicationProtectedItemInner> object + */ + public Observable> listAsync(final String skipToken, final String filter) { + return listWithServiceResponseAsync(skipToken, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of replication protected items. + * Gets the list of ASR replication protected items in the vault. + * + * @param skipToken The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null + * @param filter OData filter options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ReplicationProtectedItemInner> object + */ + public Observable>> listWithServiceResponseAsync(final String skipToken, final String filter) { + return listSinglePageAsync(skipToken, 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 list of replication protected items. + * Gets the list of ASR replication protected items in the vault. + * + ServiceResponse> * @param skipToken The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null + ServiceResponse> * @param filter OData filter options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ReplicationProtectedItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String skipToken, final String filter) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), skipToken, filter, 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); + } + + /** + * Change or apply recovery point. + * The operation to change the recovery point of a failed over replication protected item. + * + * @param fabricName The ARM fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replicated protected item's 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 ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner applyRecoveryPoint(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return applyRecoveryPointWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().last().body(); + } + + /** + * Change or apply recovery point. + * The operation to change the recovery point of a failed over replication protected item. + * + * @param fabricName The ARM fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replicated protected item's 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 applyRecoveryPointAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(applyRecoveryPointWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Change or apply recovery point. + * The operation to change the recovery point of a failed over replication protected item. + * + * @param fabricName The ARM fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replicated protected item's name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable applyRecoveryPointAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return applyRecoveryPointWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Change or apply recovery point. + * The operation to change the recovery point of a failed over replication protected item. + * + * @param fabricName The ARM fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replicated protected item's name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> applyRecoveryPointWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName 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 ApplyRecoveryPointInputProperties properties = null; + ApplyRecoveryPointInput applyRecoveryPointInput = new ApplyRecoveryPointInput(); + applyRecoveryPointInput.withProperties(null); + Observable> observable = service.applyRecoveryPoint(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), applyRecoveryPointInput, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Change or apply recovery point. + * The operation to change the recovery point of a failed over replication protected item. + * + * @param fabricName The ARM fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replicated protected item's name. + * @param properties The input properties to apply recovery point. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner applyRecoveryPoint(String fabricName, String protectionContainerName, String replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties) { + return applyRecoveryPointWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).toBlocking().last().body(); + } + + /** + * Change or apply recovery point. + * The operation to change the recovery point of a failed over replication protected item. + * + * @param fabricName The ARM fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replicated protected item's name. + * @param properties The input properties to apply recovery point. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture applyRecoveryPointAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(applyRecoveryPointWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties), serviceCallback); + } + + /** + * Change or apply recovery point. + * The operation to change the recovery point of a failed over replication protected item. + * + * @param fabricName The ARM fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replicated protected item's name. + * @param properties The input properties to apply recovery point. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable applyRecoveryPointAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties) { + return applyRecoveryPointWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Change or apply recovery point. + * The operation to change the recovery point of a failed over replication protected item. + * + * @param fabricName The ARM fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replicated protected item's name. + * @param properties The input properties to apply recovery point. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> applyRecoveryPointWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + ApplyRecoveryPointInput applyRecoveryPointInput = new ApplyRecoveryPointInput(); + applyRecoveryPointInput.withProperties(properties); + Observable> observable = service.applyRecoveryPoint(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), applyRecoveryPointInput, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Change or apply recovery point. + * The operation to change the recovery point of a failed over replication protected item. + * + * @param fabricName The ARM fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replicated protected item's 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 ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginApplyRecoveryPoint(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginApplyRecoveryPointWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().single().body(); + } + + /** + * Change or apply recovery point. + * The operation to change the recovery point of a failed over replication protected item. + * + * @param fabricName The ARM fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replicated protected item's 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 beginApplyRecoveryPointAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginApplyRecoveryPointWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Change or apply recovery point. + * The operation to change the recovery point of a failed over replication protected item. + * + * @param fabricName The ARM fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replicated protected item's name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginApplyRecoveryPointAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginApplyRecoveryPointWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Change or apply recovery point. + * The operation to change the recovery point of a failed over replication protected item. + * + * @param fabricName The ARM fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replicated protected item's name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginApplyRecoveryPointWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName 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 ApplyRecoveryPointInputProperties properties = null; + ApplyRecoveryPointInput applyRecoveryPointInput = new ApplyRecoveryPointInput(); + applyRecoveryPointInput.withProperties(null); + return service.beginApplyRecoveryPoint(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), applyRecoveryPointInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginApplyRecoveryPointDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Change or apply recovery point. + * The operation to change the recovery point of a failed over replication protected item. + * + * @param fabricName The ARM fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replicated protected item's name. + * @param properties The input properties to apply recovery point. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginApplyRecoveryPoint(String fabricName, String protectionContainerName, String replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties) { + return beginApplyRecoveryPointWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).toBlocking().single().body(); + } + + /** + * Change or apply recovery point. + * The operation to change the recovery point of a failed over replication protected item. + * + * @param fabricName The ARM fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replicated protected item's name. + * @param properties The input properties to apply recovery point. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginApplyRecoveryPointAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginApplyRecoveryPointWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties), serviceCallback); + } + + /** + * Change or apply recovery point. + * The operation to change the recovery point of a failed over replication protected item. + * + * @param fabricName The ARM fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replicated protected item's name. + * @param properties The input properties to apply recovery point. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginApplyRecoveryPointAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties) { + return beginApplyRecoveryPointWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Change or apply recovery point. + * The operation to change the recovery point of a failed over replication protected item. + * + * @param fabricName The ARM fabric name. + * @param protectionContainerName The protection container name. + * @param replicatedProtectedItemName The replicated protected item's name. + * @param properties The input properties to apply recovery point. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginApplyRecoveryPointWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + ApplyRecoveryPointInput applyRecoveryPointInput = new ApplyRecoveryPointInput(); + applyRecoveryPointInput.withProperties(properties); + return service.beginApplyRecoveryPoint(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), applyRecoveryPointInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginApplyRecoveryPointDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginApplyRecoveryPointDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Resynchronize or repair replication. + * The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the container. + * @param replicatedProtectedItemName The name of the replication protected item. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner repairReplication(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return repairReplicationWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().last().body(); + } + + /** + * Resynchronize or repair replication. + * The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the container. + * @param replicatedProtectedItemName The name of the replication protected item. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture repairReplicationAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(repairReplicationWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Resynchronize or repair replication. + * The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the container. + * @param replicatedProtectedItemName The name of the replication protected item. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable repairReplicationAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return repairReplicationWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resynchronize or repair replication. + * The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the container. + * @param replicatedProtectedItemName The name of the replication protected item. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> repairReplicationWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.repairReplication(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Resynchronize or repair replication. + * The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the container. + * @param replicatedProtectedItemName The name of the replication protected item. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginRepairReplication(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginRepairReplicationWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().single().body(); + } + + /** + * Resynchronize or repair replication. + * The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the container. + * @param replicatedProtectedItemName The name of the replication protected item. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginRepairReplicationAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRepairReplicationWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Resynchronize or repair replication. + * The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the container. + * @param replicatedProtectedItemName The name of the replication protected item. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginRepairReplicationAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginRepairReplicationWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resynchronize or repair replication. + * The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the container. + * @param replicatedProtectedItemName The name of the replication protected item. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginRepairReplicationWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginRepairReplication(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRepairReplicationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRepairReplicationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Update the mobility service on a protected item. + * The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + * + * @param fabricName The name of the fabric containing the protected item. + * @param protectionContainerName The name of the container containing the protected item. + * @param replicationProtectedItemName The name of the protected item on which the agent is to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner updateMobilityService(String fabricName, String protectionContainerName, String replicationProtectedItemName) { + return updateMobilityServiceWithServiceResponseAsync(fabricName, protectionContainerName, replicationProtectedItemName).toBlocking().last().body(); + } + + /** + * Update the mobility service on a protected item. + * The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + * + * @param fabricName The name of the fabric containing the protected item. + * @param protectionContainerName The name of the container containing the protected item. + * @param replicationProtectedItemName The name of the protected item on which the agent is to be updated. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateMobilityServiceAsync(String fabricName, String protectionContainerName, String replicationProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateMobilityServiceWithServiceResponseAsync(fabricName, protectionContainerName, replicationProtectedItemName), serviceCallback); + } + + /** + * Update the mobility service on a protected item. + * The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + * + * @param fabricName The name of the fabric containing the protected item. + * @param protectionContainerName The name of the container containing the protected item. + * @param replicationProtectedItemName The name of the protected item on which the agent is to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateMobilityServiceAsync(String fabricName, String protectionContainerName, String replicationProtectedItemName) { + return updateMobilityServiceWithServiceResponseAsync(fabricName, protectionContainerName, replicationProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update the mobility service on a protected item. + * The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + * + * @param fabricName The name of the fabric containing the protected item. + * @param protectionContainerName The name of the container containing the protected item. + * @param replicationProtectedItemName The name of the protected item on which the agent is to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateMobilityServiceWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicationProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicationProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicationProtectedItemName 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 UpdateMobilityServiceRequestProperties properties = null; + UpdateMobilityServiceRequest updateMobilityServiceRequest = new UpdateMobilityServiceRequest(); + updateMobilityServiceRequest.withProperties(null); + Observable> observable = service.updateMobilityService(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicationProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), updateMobilityServiceRequest, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Update the mobility service on a protected item. + * The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + * + * @param fabricName The name of the fabric containing the protected item. + * @param protectionContainerName The name of the container containing the protected item. + * @param replicationProtectedItemName The name of the protected item on which the agent is to be updated. + * @param properties The properties of the update mobility service request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner updateMobilityService(String fabricName, String protectionContainerName, String replicationProtectedItemName, UpdateMobilityServiceRequestProperties properties) { + return updateMobilityServiceWithServiceResponseAsync(fabricName, protectionContainerName, replicationProtectedItemName, properties).toBlocking().last().body(); + } + + /** + * Update the mobility service on a protected item. + * The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + * + * @param fabricName The name of the fabric containing the protected item. + * @param protectionContainerName The name of the container containing the protected item. + * @param replicationProtectedItemName The name of the protected item on which the agent is to be updated. + * @param properties The properties of the update mobility service request. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateMobilityServiceAsync(String fabricName, String protectionContainerName, String replicationProtectedItemName, UpdateMobilityServiceRequestProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateMobilityServiceWithServiceResponseAsync(fabricName, protectionContainerName, replicationProtectedItemName, properties), serviceCallback); + } + + /** + * Update the mobility service on a protected item. + * The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + * + * @param fabricName The name of the fabric containing the protected item. + * @param protectionContainerName The name of the container containing the protected item. + * @param replicationProtectedItemName The name of the protected item on which the agent is to be updated. + * @param properties The properties of the update mobility service request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateMobilityServiceAsync(String fabricName, String protectionContainerName, String replicationProtectedItemName, UpdateMobilityServiceRequestProperties properties) { + return updateMobilityServiceWithServiceResponseAsync(fabricName, protectionContainerName, replicationProtectedItemName, properties).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update the mobility service on a protected item. + * The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + * + * @param fabricName The name of the fabric containing the protected item. + * @param protectionContainerName The name of the container containing the protected item. + * @param replicationProtectedItemName The name of the protected item on which the agent is to be updated. + * @param properties The properties of the update mobility service request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateMobilityServiceWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicationProtectedItemName, UpdateMobilityServiceRequestProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicationProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicationProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + UpdateMobilityServiceRequest updateMobilityServiceRequest = new UpdateMobilityServiceRequest(); + updateMobilityServiceRequest.withProperties(properties); + Observable> observable = service.updateMobilityService(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicationProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), updateMobilityServiceRequest, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Update the mobility service on a protected item. + * The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + * + * @param fabricName The name of the fabric containing the protected item. + * @param protectionContainerName The name of the container containing the protected item. + * @param replicationProtectedItemName The name of the protected item on which the agent is to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginUpdateMobilityService(String fabricName, String protectionContainerName, String replicationProtectedItemName) { + return beginUpdateMobilityServiceWithServiceResponseAsync(fabricName, protectionContainerName, replicationProtectedItemName).toBlocking().single().body(); + } + + /** + * Update the mobility service on a protected item. + * The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + * + * @param fabricName The name of the fabric containing the protected item. + * @param protectionContainerName The name of the container containing the protected item. + * @param replicationProtectedItemName The name of the protected item on which the agent is to be updated. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateMobilityServiceAsync(String fabricName, String protectionContainerName, String replicationProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateMobilityServiceWithServiceResponseAsync(fabricName, protectionContainerName, replicationProtectedItemName), serviceCallback); + } + + /** + * Update the mobility service on a protected item. + * The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + * + * @param fabricName The name of the fabric containing the protected item. + * @param protectionContainerName The name of the container containing the protected item. + * @param replicationProtectedItemName The name of the protected item on which the agent is to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginUpdateMobilityServiceAsync(String fabricName, String protectionContainerName, String replicationProtectedItemName) { + return beginUpdateMobilityServiceWithServiceResponseAsync(fabricName, protectionContainerName, replicationProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update the mobility service on a protected item. + * The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + * + * @param fabricName The name of the fabric containing the protected item. + * @param protectionContainerName The name of the container containing the protected item. + * @param replicationProtectedItemName The name of the protected item on which the agent is to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginUpdateMobilityServiceWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicationProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicationProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicationProtectedItemName 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 UpdateMobilityServiceRequestProperties properties = null; + UpdateMobilityServiceRequest updateMobilityServiceRequest = new UpdateMobilityServiceRequest(); + updateMobilityServiceRequest.withProperties(null); + return service.beginUpdateMobilityService(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicationProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), updateMobilityServiceRequest, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateMobilityServiceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Update the mobility service on a protected item. + * The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + * + * @param fabricName The name of the fabric containing the protected item. + * @param protectionContainerName The name of the container containing the protected item. + * @param replicationProtectedItemName The name of the protected item on which the agent is to be updated. + * @param properties The properties of the update mobility service request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginUpdateMobilityService(String fabricName, String protectionContainerName, String replicationProtectedItemName, UpdateMobilityServiceRequestProperties properties) { + return beginUpdateMobilityServiceWithServiceResponseAsync(fabricName, protectionContainerName, replicationProtectedItemName, properties).toBlocking().single().body(); + } + + /** + * Update the mobility service on a protected item. + * The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + * + * @param fabricName The name of the fabric containing the protected item. + * @param protectionContainerName The name of the container containing the protected item. + * @param replicationProtectedItemName The name of the protected item on which the agent is to be updated. + * @param properties The properties of the update mobility service request. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateMobilityServiceAsync(String fabricName, String protectionContainerName, String replicationProtectedItemName, UpdateMobilityServiceRequestProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateMobilityServiceWithServiceResponseAsync(fabricName, protectionContainerName, replicationProtectedItemName, properties), serviceCallback); + } + + /** + * Update the mobility service on a protected item. + * The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + * + * @param fabricName The name of the fabric containing the protected item. + * @param protectionContainerName The name of the container containing the protected item. + * @param replicationProtectedItemName The name of the protected item on which the agent is to be updated. + * @param properties The properties of the update mobility service request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginUpdateMobilityServiceAsync(String fabricName, String protectionContainerName, String replicationProtectedItemName, UpdateMobilityServiceRequestProperties properties) { + return beginUpdateMobilityServiceWithServiceResponseAsync(fabricName, protectionContainerName, replicationProtectedItemName, properties).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update the mobility service on a protected item. + * The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + * + * @param fabricName The name of the fabric containing the protected item. + * @param protectionContainerName The name of the container containing the protected item. + * @param replicationProtectedItemName The name of the protected item on which the agent is to be updated. + * @param properties The properties of the update mobility service request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginUpdateMobilityServiceWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicationProtectedItemName, UpdateMobilityServiceRequestProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicationProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicationProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + UpdateMobilityServiceRequest updateMobilityServiceRequest = new UpdateMobilityServiceRequest(); + updateMobilityServiceRequest.withProperties(properties); + return service.beginUpdateMobilityService(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicationProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), updateMobilityServiceRequest, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateMobilityServiceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateMobilityServiceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Execute Reverse Replication\Reprotect. + * Operation to reprotect or reverse replicate a failed over replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner reprotect(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return reprotectWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().last().body(); + } + + /** + * Execute Reverse Replication\Reprotect. + * Operation to reprotect or reverse replicate a failed over replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 reprotectAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(reprotectWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Execute Reverse Replication\Reprotect. + * Operation to reprotect or reverse replicate a failed over replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable reprotectAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return reprotectWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute Reverse Replication\Reprotect. + * Operation to reprotect or reverse replicate a failed over replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> reprotectWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName 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 ReverseReplicationInputProperties properties = null; + ReverseReplicationInput rrInput = new ReverseReplicationInput(); + rrInput.withProperties(null); + Observable> observable = service.reprotect(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), rrInput, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Execute Reverse Replication\Reprotect. + * Operation to reprotect or reverse replicate a failed over replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Reverse replication properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner reprotect(String fabricName, String protectionContainerName, String replicatedProtectedItemName, ReverseReplicationInputProperties properties) { + return reprotectWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).toBlocking().last().body(); + } + + /** + * Execute Reverse Replication\Reprotect. + * Operation to reprotect or reverse replicate a failed over replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Reverse replication properties + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture reprotectAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, ReverseReplicationInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(reprotectWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties), serviceCallback); + } + + /** + * Execute Reverse Replication\Reprotect. + * Operation to reprotect or reverse replicate a failed over replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Reverse replication properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable reprotectAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, ReverseReplicationInputProperties properties) { + return reprotectWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute Reverse Replication\Reprotect. + * Operation to reprotect or reverse replicate a failed over replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Reverse replication properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> reprotectWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, ReverseReplicationInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + ReverseReplicationInput rrInput = new ReverseReplicationInput(); + rrInput.withProperties(properties); + Observable> observable = service.reprotect(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), rrInput, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Execute Reverse Replication\Reprotect. + * Operation to reprotect or reverse replicate a failed over replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginReprotect(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginReprotectWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().single().body(); + } + + /** + * Execute Reverse Replication\Reprotect. + * Operation to reprotect or reverse replicate a failed over replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 beginReprotectAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginReprotectWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Execute Reverse Replication\Reprotect. + * Operation to reprotect or reverse replicate a failed over replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginReprotectAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginReprotectWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute Reverse Replication\Reprotect. + * Operation to reprotect or reverse replicate a failed over replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginReprotectWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName 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 ReverseReplicationInputProperties properties = null; + ReverseReplicationInput rrInput = new ReverseReplicationInput(); + rrInput.withProperties(null); + return service.beginReprotect(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), rrInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginReprotectDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Execute Reverse Replication\Reprotect. + * Operation to reprotect or reverse replicate a failed over replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Reverse replication properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginReprotect(String fabricName, String protectionContainerName, String replicatedProtectedItemName, ReverseReplicationInputProperties properties) { + return beginReprotectWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).toBlocking().single().body(); + } + + /** + * Execute Reverse Replication\Reprotect. + * Operation to reprotect or reverse replicate a failed over replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Reverse replication properties + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginReprotectAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, ReverseReplicationInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginReprotectWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties), serviceCallback); + } + + /** + * Execute Reverse Replication\Reprotect. + * Operation to reprotect or reverse replicate a failed over replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Reverse replication properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginReprotectAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, ReverseReplicationInputProperties properties) { + return beginReprotectWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute Reverse Replication\Reprotect. + * Operation to reprotect or reverse replicate a failed over replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Reverse replication properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginReprotectWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, ReverseReplicationInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + ReverseReplicationInput rrInput = new ReverseReplicationInput(); + rrInput.withProperties(properties); + return service.beginReprotect(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), rrInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginReprotectDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginReprotectDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Execute commit failover. + * Operation to commit the failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner failoverCommit(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return failoverCommitWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().last().body(); + } + + /** + * Execute commit failover. + * Operation to commit the failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 failoverCommitAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(failoverCommitWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Execute commit failover. + * Operation to commit the failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable failoverCommitAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return failoverCommitWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute commit failover. + * Operation to commit the failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> failoverCommitWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.failoverCommit(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Execute commit failover. + * Operation to commit the failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginFailoverCommit(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginFailoverCommitWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().single().body(); + } + + /** + * Execute commit failover. + * Operation to commit the failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 beginFailoverCommitAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginFailoverCommitWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Execute commit failover. + * Operation to commit the failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginFailoverCommitAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginFailoverCommitWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute commit failover. + * Operation to commit the failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginFailoverCommitWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginFailoverCommit(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginFailoverCommitDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginFailoverCommitDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Execute test failover cleanup. + * Operation to clean up the test failover of a replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Test failover cleanup input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner testFailoverCleanup(String fabricName, String protectionContainerName, String replicatedProtectedItemName, TestFailoverCleanupInputProperties properties) { + return testFailoverCleanupWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).toBlocking().last().body(); + } + + /** + * Execute test failover cleanup. + * Operation to clean up the test failover of a replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Test failover cleanup input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture testFailoverCleanupAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, TestFailoverCleanupInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(testFailoverCleanupWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties), serviceCallback); + } + + /** + * Execute test failover cleanup. + * Operation to clean up the test failover of a replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Test failover cleanup input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable testFailoverCleanupAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, TestFailoverCleanupInputProperties properties) { + return testFailoverCleanupWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute test failover cleanup. + * Operation to clean up the test failover of a replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Test failover cleanup input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> testFailoverCleanupWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, TestFailoverCleanupInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (properties == null) { + throw new IllegalArgumentException("Parameter properties is required and cannot be null."); + } + Validator.validate(properties); + TestFailoverCleanupInput cleanupInput = new TestFailoverCleanupInput(); + cleanupInput.withProperties(properties); + Observable> observable = service.testFailoverCleanup(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), cleanupInput, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Execute test failover cleanup. + * Operation to clean up the test failover of a replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Test failover cleanup input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginTestFailoverCleanup(String fabricName, String protectionContainerName, String replicatedProtectedItemName, TestFailoverCleanupInputProperties properties) { + return beginTestFailoverCleanupWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).toBlocking().single().body(); + } + + /** + * Execute test failover cleanup. + * Operation to clean up the test failover of a replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Test failover cleanup input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginTestFailoverCleanupAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, TestFailoverCleanupInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginTestFailoverCleanupWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties), serviceCallback); + } + + /** + * Execute test failover cleanup. + * Operation to clean up the test failover of a replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Test failover cleanup input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginTestFailoverCleanupAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, TestFailoverCleanupInputProperties properties) { + return beginTestFailoverCleanupWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute test failover cleanup. + * Operation to clean up the test failover of a replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Test failover cleanup input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginTestFailoverCleanupWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, TestFailoverCleanupInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (properties == null) { + throw new IllegalArgumentException("Parameter properties is required and cannot be null."); + } + Validator.validate(properties); + TestFailoverCleanupInput cleanupInput = new TestFailoverCleanupInput(); + cleanupInput.withProperties(properties); + return service.beginTestFailoverCleanup(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), cleanupInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginTestFailoverCleanupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginTestFailoverCleanupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Execute test failover. + * Operation to perform a test failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner testFailover(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return testFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().last().body(); + } + + /** + * Execute test failover. + * Operation to perform a test failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 testFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(testFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Execute test failover. + * Operation to perform a test failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable testFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return testFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute test failover. + * Operation to perform a test failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> testFailoverWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName 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 TestFailoverInputProperties properties = null; + TestFailoverInput failoverInput = new TestFailoverInput(); + failoverInput.withProperties(null); + Observable> observable = service.testFailover(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), failoverInput, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Execute test failover. + * Operation to perform a test failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner testFailover(String fabricName, String protectionContainerName, String replicatedProtectedItemName, TestFailoverInputProperties properties) { + return testFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).toBlocking().last().body(); + } + + /** + * Execute test failover. + * Operation to perform a test failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture testFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, TestFailoverInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(testFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties), serviceCallback); + } + + /** + * Execute test failover. + * Operation to perform a test failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable testFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, TestFailoverInputProperties properties) { + return testFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute test failover. + * Operation to perform a test failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> testFailoverWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, TestFailoverInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + TestFailoverInput failoverInput = new TestFailoverInput(); + failoverInput.withProperties(properties); + Observable> observable = service.testFailover(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), failoverInput, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Execute test failover. + * Operation to perform a test failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginTestFailover(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginTestFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().single().body(); + } + + /** + * Execute test failover. + * Operation to perform a test failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 beginTestFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginTestFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Execute test failover. + * Operation to perform a test failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginTestFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginTestFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute test failover. + * Operation to perform a test failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginTestFailoverWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName 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 TestFailoverInputProperties properties = null; + TestFailoverInput failoverInput = new TestFailoverInput(); + failoverInput.withProperties(null); + return service.beginTestFailover(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), failoverInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginTestFailoverDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Execute test failover. + * Operation to perform a test failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginTestFailover(String fabricName, String protectionContainerName, String replicatedProtectedItemName, TestFailoverInputProperties properties) { + return beginTestFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).toBlocking().single().body(); + } + + /** + * Execute test failover. + * Operation to perform a test failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginTestFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, TestFailoverInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginTestFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties), serviceCallback); + } + + /** + * Execute test failover. + * Operation to perform a test failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginTestFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, TestFailoverInputProperties properties) { + return beginTestFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute test failover. + * Operation to perform a test failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginTestFailoverWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, TestFailoverInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + TestFailoverInput failoverInput = new TestFailoverInput(); + failoverInput.withProperties(properties); + return service.beginTestFailover(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), failoverInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginTestFailoverDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginTestFailoverDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Execute unplanned failover. + * Operation to initiate a failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner unplannedFailover(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return unplannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().last().body(); + } + + /** + * Execute unplanned failover. + * Operation to initiate a failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 unplannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(unplannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Execute unplanned failover. + * Operation to initiate a failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable unplannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return unplannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute unplanned failover. + * Operation to initiate a failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> unplannedFailoverWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName 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 UnplannedFailoverInputProperties properties = null; + UnplannedFailoverInput failoverInput = new UnplannedFailoverInput(); + failoverInput.withProperties(null); + Observable> observable = service.unplannedFailover(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), failoverInput, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Execute unplanned failover. + * Operation to initiate a failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner unplannedFailover(String fabricName, String protectionContainerName, String replicatedProtectedItemName, UnplannedFailoverInputProperties properties) { + return unplannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).toBlocking().last().body(); + } + + /** + * Execute unplanned failover. + * Operation to initiate a failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture unplannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, UnplannedFailoverInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(unplannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties), serviceCallback); + } + + /** + * Execute unplanned failover. + * Operation to initiate a failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable unplannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, UnplannedFailoverInputProperties properties) { + return unplannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute unplanned failover. + * Operation to initiate a failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> unplannedFailoverWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, UnplannedFailoverInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + UnplannedFailoverInput failoverInput = new UnplannedFailoverInput(); + failoverInput.withProperties(properties); + Observable> observable = service.unplannedFailover(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), failoverInput, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Execute unplanned failover. + * Operation to initiate a failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginUnplannedFailover(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginUnplannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().single().body(); + } + + /** + * Execute unplanned failover. + * Operation to initiate a failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 beginUnplannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUnplannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Execute unplanned failover. + * Operation to initiate a failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginUnplannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginUnplannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute unplanned failover. + * Operation to initiate a failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginUnplannedFailoverWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName 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 UnplannedFailoverInputProperties properties = null; + UnplannedFailoverInput failoverInput = new UnplannedFailoverInput(); + failoverInput.withProperties(null); + return service.beginUnplannedFailover(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), failoverInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUnplannedFailoverDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Execute unplanned failover. + * Operation to initiate a failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginUnplannedFailover(String fabricName, String protectionContainerName, String replicatedProtectedItemName, UnplannedFailoverInputProperties properties) { + return beginUnplannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).toBlocking().single().body(); + } + + /** + * Execute unplanned failover. + * Operation to initiate a failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUnplannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, UnplannedFailoverInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUnplannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties), serviceCallback); + } + + /** + * Execute unplanned failover. + * Operation to initiate a failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginUnplannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, UnplannedFailoverInputProperties properties) { + return beginUnplannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute unplanned failover. + * Operation to initiate a failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginUnplannedFailoverWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, UnplannedFailoverInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + UnplannedFailoverInput failoverInput = new UnplannedFailoverInput(); + failoverInput.withProperties(properties); + return service.beginUnplannedFailover(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), failoverInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUnplannedFailoverDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUnplannedFailoverDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Execute planned failover. + * Operation to initiate a planned failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner plannedFailover(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return plannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().last().body(); + } + + /** + * Execute planned failover. + * Operation to initiate a planned failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 plannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(plannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Execute planned failover. + * Operation to initiate a planned failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable plannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return plannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute planned failover. + * Operation to initiate a planned failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> plannedFailoverWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName 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 PlannedFailoverInputProperties properties = null; + PlannedFailoverInput failoverInput = new PlannedFailoverInput(); + failoverInput.withProperties(null); + Observable> observable = service.plannedFailover(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), failoverInput, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Execute planned failover. + * Operation to initiate a planned failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner plannedFailover(String fabricName, String protectionContainerName, String replicatedProtectedItemName, PlannedFailoverInputProperties properties) { + return plannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).toBlocking().last().body(); + } + + /** + * Execute planned failover. + * Operation to initiate a planned failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture plannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, PlannedFailoverInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(plannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties), serviceCallback); + } + + /** + * Execute planned failover. + * Operation to initiate a planned failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable plannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, PlannedFailoverInputProperties properties) { + return plannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute planned failover. + * Operation to initiate a planned failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> plannedFailoverWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, PlannedFailoverInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + PlannedFailoverInput failoverInput = new PlannedFailoverInput(); + failoverInput.withProperties(properties); + Observable> observable = service.plannedFailover(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), failoverInput, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Execute planned failover. + * Operation to initiate a planned failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginPlannedFailover(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginPlannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().single().body(); + } + + /** + * Execute planned failover. + * Operation to initiate a planned failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 beginPlannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginPlannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Execute planned failover. + * Operation to initiate a planned failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginPlannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginPlannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute planned failover. + * Operation to initiate a planned failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginPlannedFailoverWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName 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 PlannedFailoverInputProperties properties = null; + PlannedFailoverInput failoverInput = new PlannedFailoverInput(); + failoverInput.withProperties(null); + return service.beginPlannedFailover(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), failoverInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginPlannedFailoverDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Execute planned failover. + * Operation to initiate a planned failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginPlannedFailover(String fabricName, String protectionContainerName, String replicatedProtectedItemName, PlannedFailoverInputProperties properties) { + return beginPlannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).toBlocking().single().body(); + } + + /** + * Execute planned failover. + * Operation to initiate a planned failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginPlannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, PlannedFailoverInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginPlannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties), serviceCallback); + } + + /** + * Execute planned failover. + * Operation to initiate a planned failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginPlannedFailoverAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, PlannedFailoverInputProperties properties) { + return beginPlannedFailoverWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute planned failover. + * Operation to initiate a planned failover of the replication protected item. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Planned failover input properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginPlannedFailoverWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, PlannedFailoverInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + PlannedFailoverInput failoverInput = new PlannedFailoverInput(); + failoverInput.withProperties(properties); + return service.beginPlannedFailover(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), failoverInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginPlannedFailoverDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginPlannedFailoverDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Disables protection. + * The operation to disable replication on a replication protected item. This will also remove the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + deleteWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().last().body(); + } + + /** + * Disables protection. + * The operation to disable replication on a replication protected item. This will also remove the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 deleteAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Disables protection. + * The operation to disable replication on a replication protected item. This will also remove the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return deleteWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Disables protection. + * The operation to disable replication on a replication protected item. This will also remove the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName 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 DisableProtectionInputProperties properties = null; + DisableProtectionInput disableProtectionInput = new DisableProtectionInput(); + disableProtectionInput.withProperties(null); + Observable> observable = service.delete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), disableProtectionInput, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Disables protection. + * The operation to disable replication on a replication protected item. This will also remove the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Disable protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String fabricName, String protectionContainerName, String replicatedProtectedItemName, DisableProtectionInputProperties properties) { + deleteWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).toBlocking().last().body(); + } + + /** + * Disables protection. + * The operation to disable replication on a replication protected item. This will also remove the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Disable protection input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, DisableProtectionInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties), serviceCallback); + } + + /** + * Disables protection. + * The operation to disable replication on a replication protected item. This will also remove the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Disable protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, DisableProtectionInputProperties properties) { + return deleteWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Disables protection. + * The operation to disable replication on a replication protected item. This will also remove the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Disable protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, DisableProtectionInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + DisableProtectionInput disableProtectionInput = new DisableProtectionInput(); + disableProtectionInput.withProperties(properties); + Observable> observable = service.delete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), disableProtectionInput, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Disables protection. + * The operation to disable replication on a replication protected item. This will also remove the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + beginDeleteWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().single().body(); + } + + /** + * Disables protection. + * The operation to disable replication on a replication protected item. This will also remove the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 beginDeleteAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Disables protection. + * The operation to disable replication on a replication protected item. This will also remove the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginDeleteWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Disables protection. + * The operation to disable replication on a replication protected item. This will also remove the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName 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 DisableProtectionInputProperties properties = null; + DisableProtectionInput disableProtectionInput = new DisableProtectionInput(); + disableProtectionInput.withProperties(null); + return service.beginDelete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), disableProtectionInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Disables protection. + * The operation to disable replication on a replication protected item. This will also remove the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Disable protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String fabricName, String protectionContainerName, String replicatedProtectedItemName, DisableProtectionInputProperties properties) { + beginDeleteWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).toBlocking().single().body(); + } + + /** + * Disables protection. + * The operation to disable replication on a replication protected item. This will also remove the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Disable protection input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, DisableProtectionInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties), serviceCallback); + } + + /** + * Disables protection. + * The operation to disable replication on a replication protected item. This will also remove the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Disable protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, DisableProtectionInputProperties properties) { + return beginDeleteWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Disables protection. + * The operation to disable replication on a replication protected item. This will also remove the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Disable protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, DisableProtectionInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + DisableProtectionInput disableProtectionInput = new DisableProtectionInput(); + disableProtectionInput.withProperties(properties); + return service.beginDelete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), disableProtectionInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of a Replication protected item. + * Gets the details of an ASR replication protected item. + * + * @param fabricName Fabric unique name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner get(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return getWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().single().body(); + } + + /** + * Gets the details of a Replication protected item. + * Gets the details of an ASR replication protected item. + * + * @param fabricName Fabric unique name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 getAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Gets the details of a Replication protected item. + * Gets the details of an ASR replication protected item. + * + * @param fabricName Fabric unique name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable getAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return getWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the details of a Replication protected item. + * Gets the details of an ASR replication protected item. + * + * @param fabricName Fabric unique name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> getWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required 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(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, 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); + } + + /** + * Enables protection. + * The operation to create an ASR replication protected item (Enable replication). + * + * @param fabricName Name of the fabric. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName A name for the replication protected item. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner create(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return createWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().last().body(); + } + + /** + * Enables protection. + * The operation to create an ASR replication protected item (Enable replication). + * + * @param fabricName Name of the fabric. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName A name for the replication protected item. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Enables protection. + * The operation to create an ASR replication protected item (Enable replication). + * + * @param fabricName Name of the fabric. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName A name for the replication protected item. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return createWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Enables protection. + * The operation to create an ASR replication protected item (Enable replication). + * + * @param fabricName Name of the fabric. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName A name for the replication protected item. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName 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 EnableProtectionInputProperties properties = null; + EnableProtectionInput input = new EnableProtectionInput(); + input.withProperties(null); + Observable> observable = service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Enables protection. + * The operation to create an ASR replication protected item (Enable replication). + * + * @param fabricName Name of the fabric. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName A name for the replication protected item. + * @param properties Enable protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner create(String fabricName, String protectionContainerName, String replicatedProtectedItemName, EnableProtectionInputProperties properties) { + return createWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).toBlocking().last().body(); + } + + /** + * Enables protection. + * The operation to create an ASR replication protected item (Enable replication). + * + * @param fabricName Name of the fabric. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName A name for the replication protected item. + * @param properties Enable protection input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, EnableProtectionInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties), serviceCallback); + } + + /** + * Enables protection. + * The operation to create an ASR replication protected item (Enable replication). + * + * @param fabricName Name of the fabric. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName A name for the replication protected item. + * @param properties Enable protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, EnableProtectionInputProperties properties) { + return createWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Enables protection. + * The operation to create an ASR replication protected item (Enable replication). + * + * @param fabricName Name of the fabric. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName A name for the replication protected item. + * @param properties Enable protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, EnableProtectionInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + EnableProtectionInput input = new EnableProtectionInput(); + input.withProperties(properties); + Observable> observable = service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Enables protection. + * The operation to create an ASR replication protected item (Enable replication). + * + * @param fabricName Name of the fabric. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName A name for the replication protected item. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginCreate(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginCreateWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().single().body(); + } + + /** + * Enables protection. + * The operation to create an ASR replication protected item (Enable replication). + * + * @param fabricName Name of the fabric. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName A name for the replication protected item. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Enables protection. + * The operation to create an ASR replication protected item (Enable replication). + * + * @param fabricName Name of the fabric. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName A name for the replication protected item. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginCreateAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginCreateWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Enables protection. + * The operation to create an ASR replication protected item (Enable replication). + * + * @param fabricName Name of the fabric. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName A name for the replication protected item. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName 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 EnableProtectionInputProperties properties = null; + EnableProtectionInput input = new EnableProtectionInput(); + input.withProperties(null); + return service.beginCreate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Enables protection. + * The operation to create an ASR replication protected item (Enable replication). + * + * @param fabricName Name of the fabric. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName A name for the replication protected item. + * @param properties Enable protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginCreate(String fabricName, String protectionContainerName, String replicatedProtectedItemName, EnableProtectionInputProperties properties) { + return beginCreateWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).toBlocking().single().body(); + } + + /** + * Enables protection. + * The operation to create an ASR replication protected item (Enable replication). + * + * @param fabricName Name of the fabric. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName A name for the replication protected item. + * @param properties Enable protection input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, EnableProtectionInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties), serviceCallback); + } + + /** + * Enables protection. + * The operation to create an ASR replication protected item (Enable replication). + * + * @param fabricName Name of the fabric. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName A name for the replication protected item. + * @param properties Enable protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginCreateAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, EnableProtectionInputProperties properties) { + return beginCreateWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Enables protection. + * The operation to create an ASR replication protected item (Enable replication). + * + * @param fabricName Name of the fabric. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName A name for the replication protected item. + * @param properties Enable protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, EnableProtectionInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + EnableProtectionInput input = new EnableProtectionInput(); + input.withProperties(properties); + return service.beginCreate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Purges protection. + * The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void purge(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + purgeWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().last().body(); + } + + /** + * Purges protection. + * The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 purgeAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(purgeWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Purges protection. + * The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable purgeAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return purgeWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Purges protection. + * The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> purgeWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.purge(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Purges protection. + * The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginPurge(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + beginPurgeWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().single().body(); + } + + /** + * Purges protection. + * The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 beginPurgeAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginPurgeWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Purges protection. + * The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginPurgeAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginPurgeWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Purges protection. + * The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginPurgeWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginPurge(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginPurgeDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginPurgeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates protection. + * The operation to update the recovery settings of an ASR replication protected item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner update(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return updateWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().last().body(); + } + + /** + * Updates protection. + * The operation to update the recovery settings of an ASR replication protected item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Updates protection. + * The operation to update the recovery settings of an ASR replication protected item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return updateWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates protection. + * The operation to update the recovery settings of an ASR replication protected item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName 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 UpdateReplicationProtectedItemInputProperties properties = null; + UpdateReplicationProtectedItemInput updateProtectionInput = new UpdateReplicationProtectedItemInput(); + updateProtectionInput.withProperties(null); + Observable> observable = service.update(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), updateProtectionInput, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates protection. + * The operation to update the recovery settings of an ASR replication protected item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Update replication protected item properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner update(String fabricName, String protectionContainerName, String replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties) { + return updateWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).toBlocking().last().body(); + } + + /** + * Updates protection. + * The operation to update the recovery settings of an ASR replication protected item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Update replication protected item properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties), serviceCallback); + } + + /** + * Updates protection. + * The operation to update the recovery settings of an ASR replication protected item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Update replication protected item properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties) { + return updateWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates protection. + * The operation to update the recovery settings of an ASR replication protected item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Update replication protected item properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + UpdateReplicationProtectedItemInput updateProtectionInput = new UpdateReplicationProtectedItemInput(); + updateProtectionInput.withProperties(properties); + Observable> observable = service.update(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), updateProtectionInput, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates protection. + * The operation to update the recovery settings of an ASR replication protected item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginUpdate(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginUpdateWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).toBlocking().single().body(); + } + + /** + * Updates protection. + * The operation to update the recovery settings of an ASR replication protected item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item 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 beginUpdateAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName), serviceCallback); + } + + /** + * Updates protection. + * The operation to update the recovery settings of an ASR replication protected item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginUpdateAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + return beginUpdateWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates protection. + * The operation to update the recovery settings of an ASR replication protected item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName 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 UpdateReplicationProtectedItemInputProperties properties = null; + UpdateReplicationProtectedItemInput updateProtectionInput = new UpdateReplicationProtectedItemInput(); + updateProtectionInput.withProperties(null); + return service.beginUpdate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), updateProtectionInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates protection. + * The operation to update the recovery settings of an ASR replication protected item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Update replication protected item properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationProtectedItemInner object if successful. + */ + public ReplicationProtectedItemInner beginUpdate(String fabricName, String protectionContainerName, String replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties) { + return beginUpdateWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).toBlocking().single().body(); + } + + /** + * Updates protection. + * The operation to update the recovery settings of an ASR replication protected item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Update replication protected item properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties), serviceCallback); + } + + /** + * Updates protection. + * The operation to update the recovery settings of an ASR replication protected item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Update replication protected item properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable beginUpdateAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties) { + return beginUpdateWithServiceResponseAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).map(new Func1, ReplicationProtectedItemInner>() { + @Override + public ReplicationProtectedItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates protection. + * The operation to update the recovery settings of an ASR replication protected item. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param replicatedProtectedItemName Replication protected item name. + * @param properties Update replication protected item properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationProtectedItemInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String fabricName, String protectionContainerName, String replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (replicatedProtectedItemName == null) { + throw new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + UpdateReplicationProtectedItemInput updateProtectionInput = new UpdateReplicationProtectedItemInput(); + updateProtectionInput.withProperties(properties); + return service.beginUpdate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, this.client.apiVersion(), this.client.acceptLanguage(), updateProtectionInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the list of Replication protected items. + * Gets the list of ASR replication protected items in the protection container. + * + * @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<ReplicationProtectedItemInner> object if successful. + */ + public PagedList listByReplicationProtectionContainersNext(final String nextPageLink) { + ServiceResponse> response = listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of Replication protected items. + * Gets the list of ASR replication protected items in the protection container. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByReplicationProtectionContainersNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of Replication protected items. + * Gets the list of ASR replication protected items in the protection container. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ReplicationProtectedItemInner> object + */ + public Observable> listByReplicationProtectionContainersNextAsync(final String nextPageLink) { + return listByReplicationProtectionContainersNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of Replication protected items. + * Gets the list of ASR replication protected items in the protection container. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ReplicationProtectedItemInner> object + */ + public Observable>> listByReplicationProtectionContainersNextWithServiceResponseAsync(final String nextPageLink) { + return listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationProtectionContainersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of Replication protected items. + * Gets the list of ASR replication protected items in the protection container. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ReplicationProtectedItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationProtectionContainersNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByReplicationProtectionContainersNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationProtectionContainersNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationProtectionContainersNextDelegate(Response response) 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 list of replication protected items. + * Gets the list of ASR replication protected items in the vault. + * + * @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<ReplicationProtectedItemInner> 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 list of replication protected items. + * Gets the list of ASR replication protected items in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback 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 list of replication protected items. + * Gets the list of ASR replication protected items in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ReplicationProtectedItemInner> 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 list of replication protected items. + * Gets the list of ASR replication protected items in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ReplicationProtectedItemInner> 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 list of replication protected items. + * Gets the list of ASR replication protected items in the vault. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ReplicationProtectedItemInner> 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectionContainerMappingsImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectionContainerMappingsImpl.java new file mode 100644 index 0000000000000..3f9f7ee006820 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectionContainerMappingsImpl.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainerMappings; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ProtectionContainerMapping; + +class ReplicationProtectionContainerMappingsImpl extends WrapperImpl implements ReplicationProtectionContainerMappings { + private final RecoveryServicesManager manager; + + ReplicationProtectionContainerMappingsImpl(RecoveryServicesManager manager) { + super(manager.inner().replicationProtectionContainerMappings()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public ProtectionContainerMappingImpl define(String name) { + return wrapModel(name); + } + + private ProtectionContainerMappingImpl wrapModel(ProtectionContainerMappingInner inner) { + return new ProtectionContainerMappingImpl(inner, manager()); + } + + private ProtectionContainerMappingImpl wrapModel(String name) { + return new ProtectionContainerMappingImpl(name, this.manager()); + } + + @Override + public Completable deleteAsync(String fabricName, String protectionContainerName, String mappingName) { + ReplicationProtectionContainerMappingsInner client = this.inner(); + return client.deleteAsync(fabricName, protectionContainerName, mappingName).toCompletable(); + } + + @Override + public Observable listAsync() { + ReplicationProtectionContainerMappingsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProtectionContainerMapping call(ProtectionContainerMappingInner inner) { + return new ProtectionContainerMappingImpl(inner, manager()); + } + }); + } + + @Override + public Observable listByReplicationProtectionContainersAsync(final String fabricName, final String protectionContainerName) { + ReplicationProtectionContainerMappingsInner client = this.inner(); + return client.listByReplicationProtectionContainersAsync(fabricName, protectionContainerName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProtectionContainerMapping call(ProtectionContainerMappingInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String fabricName, String protectionContainerName, String mappingName) { + ReplicationProtectionContainerMappingsInner client = this.inner(); + return client.getAsync(fabricName, protectionContainerName, mappingName) + .map(new Func1() { + @Override + public ProtectionContainerMapping call(ProtectionContainerMappingInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable purgeAsync(String fabricName, String protectionContainerName, String mappingName) { + ReplicationProtectionContainerMappingsInner client = this.inner(); + return client.purgeAsync(fabricName, protectionContainerName, mappingName).toCompletable(); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectionContainerMappingsInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectionContainerMappingsInner.java new file mode 100644 index 0000000000000..fcaf59f71fb33 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectionContainerMappingsInner.java @@ -0,0 +1,1668 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.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.management.recoveryservicessiterecovery.v2018_01_10.CreateProtectionContainerMappingInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.CreateProtectionContainerMappingInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RemoveProtectionContainerMappingInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RemoveProtectionContainerMappingInputProperties; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ReplicationProtectionContainerMappings. + */ +public class ReplicationProtectionContainerMappingsInner { + /** The Retrofit service to perform REST calls. */ + private ReplicationProtectionContainerMappingsService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationProtectionContainerMappingsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReplicationProtectionContainerMappingsInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(ReplicationProtectionContainerMappingsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReplicationProtectionContainerMappings to be + * used by Retrofit to perform actually REST calls. + */ + interface ReplicationProtectionContainerMappingsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainerMappings delete" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}/remove") + Observable> delete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("mappingName") String mappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RemoveProtectionContainerMappingInput removalInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainerMappings beginDelete" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}/remove") + Observable> beginDelete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("mappingName") String mappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RemoveProtectionContainerMappingInput removalInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainerMappings get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("mappingName") String mappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainerMappings create" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}") + Observable> create(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("mappingName") String mappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CreateProtectionContainerMappingInput creationInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainerMappings beginCreate" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}") + Observable> beginCreate(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("mappingName") String mappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CreateProtectionContainerMappingInput creationInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainerMappings purge" }) + @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}", method = "DELETE", hasBody = true) + Observable> purge(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("mappingName") String mappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainerMappings beginPurge" }) + @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}", method = "DELETE", hasBody = true) + Observable> beginPurge(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Path("mappingName") String mappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainerMappings listByReplicationProtectionContainers" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings") + Observable> listByReplicationProtectionContainers(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainerMappings list" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionContainerMappings") + Observable> list(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainerMappings listByReplicationProtectionContainersNext" }) + @GET + Observable> listByReplicationProtectionContainersNext(@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.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainerMappings listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Remove protection container mapping. + * The operation to delete or remove a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String fabricName, String protectionContainerName, String mappingName) { + deleteWithServiceResponseAsync(fabricName, protectionContainerName, mappingName).toBlocking().last().body(); + } + + /** + * Remove protection container mapping. + * The operation to delete or remove a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping 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 deleteAsync(String fabricName, String protectionContainerName, String mappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(fabricName, protectionContainerName, mappingName), serviceCallback); + } + + /** + * Remove protection container mapping. + * The operation to delete or remove a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String fabricName, String protectionContainerName, String mappingName) { + return deleteWithServiceResponseAsync(fabricName, protectionContainerName, mappingName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Remove protection container mapping. + * The operation to delete or remove a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String fabricName, String protectionContainerName, String mappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (mappingName == null) { + throw new IllegalArgumentException("Parameter mappingName 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 RemoveProtectionContainerMappingInputProperties properties = null; + RemoveProtectionContainerMappingInput removalInput = new RemoveProtectionContainerMappingInput(); + removalInput.withProperties(null); + Observable> observable = service.delete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, mappingName, this.client.apiVersion(), this.client.acceptLanguage(), removalInput, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Remove protection container mapping. + * The operation to delete or remove a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @param properties Configure protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String fabricName, String protectionContainerName, String mappingName, RemoveProtectionContainerMappingInputProperties properties) { + deleteWithServiceResponseAsync(fabricName, protectionContainerName, mappingName, properties).toBlocking().last().body(); + } + + /** + * Remove protection container mapping. + * The operation to delete or remove a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @param properties Configure protection input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String fabricName, String protectionContainerName, String mappingName, RemoveProtectionContainerMappingInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(fabricName, protectionContainerName, mappingName, properties), serviceCallback); + } + + /** + * Remove protection container mapping. + * The operation to delete or remove a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @param properties Configure protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String fabricName, String protectionContainerName, String mappingName, RemoveProtectionContainerMappingInputProperties properties) { + return deleteWithServiceResponseAsync(fabricName, protectionContainerName, mappingName, properties).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Remove protection container mapping. + * The operation to delete or remove a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @param properties Configure protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String fabricName, String protectionContainerName, String mappingName, RemoveProtectionContainerMappingInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (mappingName == null) { + throw new IllegalArgumentException("Parameter mappingName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + RemoveProtectionContainerMappingInput removalInput = new RemoveProtectionContainerMappingInput(); + removalInput.withProperties(properties); + Observable> observable = service.delete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, mappingName, this.client.apiVersion(), this.client.acceptLanguage(), removalInput, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Remove protection container mapping. + * The operation to delete or remove a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String fabricName, String protectionContainerName, String mappingName) { + beginDeleteWithServiceResponseAsync(fabricName, protectionContainerName, mappingName).toBlocking().single().body(); + } + + /** + * Remove protection container mapping. + * The operation to delete or remove a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping 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 beginDeleteAsync(String fabricName, String protectionContainerName, String mappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(fabricName, protectionContainerName, mappingName), serviceCallback); + } + + /** + * Remove protection container mapping. + * The operation to delete or remove a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String fabricName, String protectionContainerName, String mappingName) { + return beginDeleteWithServiceResponseAsync(fabricName, protectionContainerName, mappingName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Remove protection container mapping. + * The operation to delete or remove a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String fabricName, String protectionContainerName, String mappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (mappingName == null) { + throw new IllegalArgumentException("Parameter mappingName 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 RemoveProtectionContainerMappingInputProperties properties = null; + RemoveProtectionContainerMappingInput removalInput = new RemoveProtectionContainerMappingInput(); + removalInput.withProperties(null); + return service.beginDelete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, mappingName, this.client.apiVersion(), this.client.acceptLanguage(), removalInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Remove protection container mapping. + * The operation to delete or remove a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @param properties Configure protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String fabricName, String protectionContainerName, String mappingName, RemoveProtectionContainerMappingInputProperties properties) { + beginDeleteWithServiceResponseAsync(fabricName, protectionContainerName, mappingName, properties).toBlocking().single().body(); + } + + /** + * Remove protection container mapping. + * The operation to delete or remove a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @param properties Configure protection input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String fabricName, String protectionContainerName, String mappingName, RemoveProtectionContainerMappingInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(fabricName, protectionContainerName, mappingName, properties), serviceCallback); + } + + /** + * Remove protection container mapping. + * The operation to delete or remove a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @param properties Configure protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String fabricName, String protectionContainerName, String mappingName, RemoveProtectionContainerMappingInputProperties properties) { + return beginDeleteWithServiceResponseAsync(fabricName, protectionContainerName, mappingName, properties).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Remove protection container mapping. + * The operation to delete or remove a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @param properties Configure protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String fabricName, String protectionContainerName, String mappingName, RemoveProtectionContainerMappingInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (mappingName == null) { + throw new IllegalArgumentException("Parameter mappingName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + RemoveProtectionContainerMappingInput removalInput = new RemoveProtectionContainerMappingInput(); + removalInput.withProperties(properties); + return service.beginDelete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, mappingName, this.client.apiVersion(), this.client.acceptLanguage(), removalInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a protection container mapping/. + * Gets the details of a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection Container mapping 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 ProtectionContainerMappingInner object if successful. + */ + public ProtectionContainerMappingInner get(String fabricName, String protectionContainerName, String mappingName) { + return getWithServiceResponseAsync(fabricName, protectionContainerName, mappingName).toBlocking().single().body(); + } + + /** + * Gets a protection container mapping/. + * Gets the details of a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection Container mapping 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 getAsync(String fabricName, String protectionContainerName, String mappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(fabricName, protectionContainerName, mappingName), serviceCallback); + } + + /** + * Gets a protection container mapping/. + * Gets the details of a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection Container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerMappingInner object + */ + public Observable getAsync(String fabricName, String protectionContainerName, String mappingName) { + return getWithServiceResponseAsync(fabricName, protectionContainerName, mappingName).map(new Func1, ProtectionContainerMappingInner>() { + @Override + public ProtectionContainerMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a protection container mapping/. + * Gets the details of a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection Container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerMappingInner object + */ + public Observable> getWithServiceResponseAsync(String fabricName, String protectionContainerName, String mappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (mappingName == null) { + throw new IllegalArgumentException("Parameter mappingName is required 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(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, mappingName, 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); + } + + /** + * Create protection container mapping. + * The operation to create a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping 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 ProtectionContainerMappingInner object if successful. + */ + public ProtectionContainerMappingInner create(String fabricName, String protectionContainerName, String mappingName) { + return createWithServiceResponseAsync(fabricName, protectionContainerName, mappingName).toBlocking().last().body(); + } + + /** + * Create protection container mapping. + * The operation to create a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping 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 createAsync(String fabricName, String protectionContainerName, String mappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(fabricName, protectionContainerName, mappingName), serviceCallback); + } + + /** + * Create protection container mapping. + * The operation to create a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String fabricName, String protectionContainerName, String mappingName) { + return createWithServiceResponseAsync(fabricName, protectionContainerName, mappingName).map(new Func1, ProtectionContainerMappingInner>() { + @Override + public ProtectionContainerMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create protection container mapping. + * The operation to create a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String fabricName, String protectionContainerName, String mappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (mappingName == null) { + throw new IllegalArgumentException("Parameter mappingName 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 CreateProtectionContainerMappingInputProperties properties = null; + CreateProtectionContainerMappingInput creationInput = new CreateProtectionContainerMappingInput(); + creationInput.withProperties(null); + Observable> observable = service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, mappingName, this.client.apiVersion(), this.client.acceptLanguage(), creationInput, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Create protection container mapping. + * The operation to create a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @param properties Configure protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProtectionContainerMappingInner object if successful. + */ + public ProtectionContainerMappingInner create(String fabricName, String protectionContainerName, String mappingName, CreateProtectionContainerMappingInputProperties properties) { + return createWithServiceResponseAsync(fabricName, protectionContainerName, mappingName, properties).toBlocking().last().body(); + } + + /** + * Create protection container mapping. + * The operation to create a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @param properties Configure protection input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String fabricName, String protectionContainerName, String mappingName, CreateProtectionContainerMappingInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(fabricName, protectionContainerName, mappingName, properties), serviceCallback); + } + + /** + * Create protection container mapping. + * The operation to create a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @param properties Configure protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String fabricName, String protectionContainerName, String mappingName, CreateProtectionContainerMappingInputProperties properties) { + return createWithServiceResponseAsync(fabricName, protectionContainerName, mappingName, properties).map(new Func1, ProtectionContainerMappingInner>() { + @Override + public ProtectionContainerMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create protection container mapping. + * The operation to create a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @param properties Configure protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String fabricName, String protectionContainerName, String mappingName, CreateProtectionContainerMappingInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (mappingName == null) { + throw new IllegalArgumentException("Parameter mappingName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + CreateProtectionContainerMappingInput creationInput = new CreateProtectionContainerMappingInput(); + creationInput.withProperties(properties); + Observable> observable = service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, mappingName, this.client.apiVersion(), this.client.acceptLanguage(), creationInput, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create protection container mapping. + * The operation to create a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping 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 ProtectionContainerMappingInner object if successful. + */ + public ProtectionContainerMappingInner beginCreate(String fabricName, String protectionContainerName, String mappingName) { + return beginCreateWithServiceResponseAsync(fabricName, protectionContainerName, mappingName).toBlocking().single().body(); + } + + /** + * Create protection container mapping. + * The operation to create a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping 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 beginCreateAsync(String fabricName, String protectionContainerName, String mappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(fabricName, protectionContainerName, mappingName), serviceCallback); + } + + /** + * Create protection container mapping. + * The operation to create a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerMappingInner object + */ + public Observable beginCreateAsync(String fabricName, String protectionContainerName, String mappingName) { + return beginCreateWithServiceResponseAsync(fabricName, protectionContainerName, mappingName).map(new Func1, ProtectionContainerMappingInner>() { + @Override + public ProtectionContainerMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create protection container mapping. + * The operation to create a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerMappingInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String fabricName, String protectionContainerName, String mappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (mappingName == null) { + throw new IllegalArgumentException("Parameter mappingName 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 CreateProtectionContainerMappingInputProperties properties = null; + CreateProtectionContainerMappingInput creationInput = new CreateProtectionContainerMappingInput(); + creationInput.withProperties(null); + return service.beginCreate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, mappingName, this.client.apiVersion(), this.client.acceptLanguage(), creationInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Create protection container mapping. + * The operation to create a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @param properties Configure protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProtectionContainerMappingInner object if successful. + */ + public ProtectionContainerMappingInner beginCreate(String fabricName, String protectionContainerName, String mappingName, CreateProtectionContainerMappingInputProperties properties) { + return beginCreateWithServiceResponseAsync(fabricName, protectionContainerName, mappingName, properties).toBlocking().single().body(); + } + + /** + * Create protection container mapping. + * The operation to create a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @param properties Configure protection input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String fabricName, String protectionContainerName, String mappingName, CreateProtectionContainerMappingInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(fabricName, protectionContainerName, mappingName, properties), serviceCallback); + } + + /** + * Create protection container mapping. + * The operation to create a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @param properties Configure protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerMappingInner object + */ + public Observable beginCreateAsync(String fabricName, String protectionContainerName, String mappingName, CreateProtectionContainerMappingInputProperties properties) { + return beginCreateWithServiceResponseAsync(fabricName, protectionContainerName, mappingName, properties).map(new Func1, ProtectionContainerMappingInner>() { + @Override + public ProtectionContainerMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create protection container mapping. + * The operation to create a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @param properties Configure protection input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerMappingInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String fabricName, String protectionContainerName, String mappingName, CreateProtectionContainerMappingInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (mappingName == null) { + throw new IllegalArgumentException("Parameter mappingName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + CreateProtectionContainerMappingInput creationInput = new CreateProtectionContainerMappingInput(); + creationInput.withProperties(properties); + return service.beginCreate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, mappingName, this.client.apiVersion(), this.client.acceptLanguage(), creationInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Purge protection container mapping. + * The operation to purge(force delete) a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void purge(String fabricName, String protectionContainerName, String mappingName) { + purgeWithServiceResponseAsync(fabricName, protectionContainerName, mappingName).toBlocking().last().body(); + } + + /** + * Purge protection container mapping. + * The operation to purge(force delete) a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping 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 purgeAsync(String fabricName, String protectionContainerName, String mappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(purgeWithServiceResponseAsync(fabricName, protectionContainerName, mappingName), serviceCallback); + } + + /** + * Purge protection container mapping. + * The operation to purge(force delete) a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable purgeAsync(String fabricName, String protectionContainerName, String mappingName) { + return purgeWithServiceResponseAsync(fabricName, protectionContainerName, mappingName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Purge protection container mapping. + * The operation to purge(force delete) a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> purgeWithServiceResponseAsync(String fabricName, String protectionContainerName, String mappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (mappingName == null) { + throw new IllegalArgumentException("Parameter mappingName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.purge(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, mappingName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Purge protection container mapping. + * The operation to purge(force delete) a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginPurge(String fabricName, String protectionContainerName, String mappingName) { + beginPurgeWithServiceResponseAsync(fabricName, protectionContainerName, mappingName).toBlocking().single().body(); + } + + /** + * Purge protection container mapping. + * The operation to purge(force delete) a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping 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 beginPurgeAsync(String fabricName, String protectionContainerName, String mappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginPurgeWithServiceResponseAsync(fabricName, protectionContainerName, mappingName), serviceCallback); + } + + /** + * Purge protection container mapping. + * The operation to purge(force delete) a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginPurgeAsync(String fabricName, String protectionContainerName, String mappingName) { + return beginPurgeWithServiceResponseAsync(fabricName, protectionContainerName, mappingName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Purge protection container mapping. + * The operation to purge(force delete) a protection container mapping. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @param mappingName Protection container mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginPurgeWithServiceResponseAsync(String fabricName, String protectionContainerName, String mappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (mappingName == null) { + throw new IllegalArgumentException("Parameter mappingName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginPurge(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, mappingName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginPurgeDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginPurgeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the list of protection container mappings for a protection container. + * Lists the protection container mappings for a protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container 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<ProtectionContainerMappingInner> object if successful. + */ + public PagedList listByReplicationProtectionContainers(final String fabricName, final String protectionContainerName) { + ServiceResponse> response = listByReplicationProtectionContainersSinglePageAsync(fabricName, protectionContainerName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of protection container mappings for a protection container. + * Lists the protection container mappings for a protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container 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> listByReplicationProtectionContainersAsync(final String fabricName, final String protectionContainerName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationProtectionContainersSinglePageAsync(fabricName, protectionContainerName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of protection container mappings for a protection container. + * Lists the protection container mappings for a protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectionContainerMappingInner> object + */ + public Observable> listByReplicationProtectionContainersAsync(final String fabricName, final String protectionContainerName) { + return listByReplicationProtectionContainersWithServiceResponseAsync(fabricName, protectionContainerName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of protection container mappings for a protection container. + * Lists the protection container mappings for a protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectionContainerMappingInner> object + */ + public Observable>> listByReplicationProtectionContainersWithServiceResponseAsync(final String fabricName, final String protectionContainerName) { + return listByReplicationProtectionContainersSinglePageAsync(fabricName, protectionContainerName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationProtectionContainersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of protection container mappings for a protection container. + * Lists the protection container mappings for a protection container. + * + ServiceResponse> * @param fabricName Fabric name. + ServiceResponse> * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProtectionContainerMappingInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationProtectionContainersSinglePageAsync(final String fabricName, final String protectionContainerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByReplicationProtectionContainers(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationProtectionContainersDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationProtectionContainersDelegate(Response response) 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 list of all protection container mappings in a vault. + * Lists the protection container mappings in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProtectionContainerMappingInner> 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 list of all protection container mappings in a vault. + * Lists the protection container mappings in the vault. + * + * @param serviceCallback 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 list of all protection container mappings in a vault. + * Lists the protection container mappings in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectionContainerMappingInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of all protection container mappings in a vault. + * Lists the protection container mappings in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectionContainerMappingInner> 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 list of all protection container mappings in a vault. + * Lists the protection container mappings in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProtectionContainerMappingInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = 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 list of protection container mappings for a protection container. + * Lists the protection container mappings for a protection container. + * + * @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<ProtectionContainerMappingInner> object if successful. + */ + public PagedList listByReplicationProtectionContainersNext(final String nextPageLink) { + ServiceResponse> response = listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of protection container mappings for a protection container. + * Lists the protection container mappings for a protection container. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByReplicationProtectionContainersNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of protection container mappings for a protection container. + * Lists the protection container mappings for a protection container. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectionContainerMappingInner> object + */ + public Observable> listByReplicationProtectionContainersNextAsync(final String nextPageLink) { + return listByReplicationProtectionContainersNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of protection container mappings for a protection container. + * Lists the protection container mappings for a protection container. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectionContainerMappingInner> object + */ + public Observable>> listByReplicationProtectionContainersNextWithServiceResponseAsync(final String nextPageLink) { + return listByReplicationProtectionContainersNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationProtectionContainersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of protection container mappings for a protection container. + * Lists the protection container mappings for a protection container. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProtectionContainerMappingInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationProtectionContainersNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByReplicationProtectionContainersNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationProtectionContainersNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationProtectionContainersNextDelegate(Response response) 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 list of all protection container mappings in a vault. + * Lists the protection container mappings in the vault. + * + * @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<ProtectionContainerMappingInner> 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 list of all protection container mappings in a vault. + * Lists the protection container mappings in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback 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 list of all protection container mappings in a vault. + * Lists the protection container mappings in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectionContainerMappingInner> 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 list of all protection container mappings in a vault. + * Lists the protection container mappings in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectionContainerMappingInner> 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 list of all protection container mappings in a vault. + * Lists the protection container mappings in the vault. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProtectionContainerMappingInner> 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectionContainersImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectionContainersImpl.java new file mode 100644 index 0000000000000..bc17d5da79fb2 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectionContainersImpl.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainers; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import rx.Completable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ProtectionContainer; + +class ReplicationProtectionContainersImpl extends WrapperImpl implements ReplicationProtectionContainers { + private final RecoveryServicesManager manager; + + ReplicationProtectionContainersImpl(RecoveryServicesManager manager) { + super(manager.inner().replicationProtectionContainers()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public ProtectionContainerImpl define(String name) { + return wrapModel(name); + } + + private ProtectionContainerImpl wrapModel(ProtectionContainerInner inner) { + return new ProtectionContainerImpl(inner, manager()); + } + + private ProtectionContainerImpl wrapModel(String name) { + return new ProtectionContainerImpl(name, this.manager()); + } + + @Override + public Observable switchProtectionAsync(String fabricName, String protectionContainerName) { + ReplicationProtectionContainersInner client = this.inner(); + return client.switchProtectionAsync(fabricName, protectionContainerName) + .map(new Func1() { + @Override + public ProtectionContainer call(ProtectionContainerInner inner) { + return new ProtectionContainerImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteAsync(String fabricName, String protectionContainerName) { + ReplicationProtectionContainersInner client = this.inner(); + return client.deleteAsync(fabricName, protectionContainerName).toCompletable(); + } + + @Override + public Observable discoverProtectableItemAsync(String fabricName, String protectionContainerName) { + ReplicationProtectionContainersInner client = this.inner(); + return client.discoverProtectableItemAsync(fabricName, protectionContainerName) + .map(new Func1() { + @Override + public ProtectionContainer call(ProtectionContainerInner inner) { + return new ProtectionContainerImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAsync() { + ReplicationProtectionContainersInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProtectionContainer call(ProtectionContainerInner inner) { + return new ProtectionContainerImpl(inner, manager()); + } + }); + } + + @Override + public Observable listByReplicationFabricsAsync(final String fabricName) { + ReplicationProtectionContainersInner client = this.inner(); + return client.listByReplicationFabricsAsync(fabricName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProtectionContainer call(ProtectionContainerInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String fabricName, String protectionContainerName) { + ReplicationProtectionContainersInner client = this.inner(); + return client.getAsync(fabricName, protectionContainerName) + .map(new Func1() { + @Override + public ProtectionContainer call(ProtectionContainerInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectionContainersInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectionContainersInner.java new file mode 100644 index 0000000000000..de6b932a82004 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationProtectionContainersInner.java @@ -0,0 +1,1960 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.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.management.recoveryservicessiterecovery.v2018_01_10.CreateProtectionContainerInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.CreateProtectionContainerInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.DiscoverProtectableItemRequest; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.DiscoverProtectableItemRequestProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.SwitchProtectionInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.SwitchProtectionInputProperties; +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.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ReplicationProtectionContainers. + */ +public class ReplicationProtectionContainersInner implements InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private ReplicationProtectionContainersService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationProtectionContainersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReplicationProtectionContainersInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(ReplicationProtectionContainersService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReplicationProtectionContainers to be + * used by Retrofit to perform actually REST calls. + */ + interface ReplicationProtectionContainersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainers switchProtection" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/switchprotection") + Observable> switchProtection(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body SwitchProtectionInput switchInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainers beginSwitchProtection" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/switchprotection") + Observable> beginSwitchProtection(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body SwitchProtectionInput switchInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainers delete" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/remove") + Observable> delete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainers beginDelete" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/remove") + Observable> beginDelete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainers discoverProtectableItem" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/discoverProtectableItem") + Observable> discoverProtectableItem(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DiscoverProtectableItemRequest discoverProtectableItemRequest, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainers beginDiscoverProtectableItem" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/discoverProtectableItem") + Observable> beginDiscoverProtectableItem(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DiscoverProtectableItemRequest discoverProtectableItemRequest, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainers get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainers create" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}") + Observable> create(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CreateProtectionContainerInput creationInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainers beginCreate" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}") + Observable> beginCreate(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("protectionContainerName") String protectionContainerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CreateProtectionContainerInput creationInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainers listByReplicationFabrics" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers") + Observable> listByReplicationFabrics(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainers list" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionContainers") + Observable> list(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainers listByReplicationFabricsNext" }) + @GET + Observable> listByReplicationFabricsNext(@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.recoveryservicessiterecovery.v2018_01_10.ReplicationProtectionContainers listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Switches protection from one container to another or one replication provider to another. + * Operation to switch protection from one container to another or one replication provider to another. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container 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 ProtectionContainerInner object if successful. + */ + public ProtectionContainerInner switchProtection(String fabricName, String protectionContainerName) { + return switchProtectionWithServiceResponseAsync(fabricName, protectionContainerName).toBlocking().last().body(); + } + + /** + * Switches protection from one container to another or one replication provider to another. + * Operation to switch protection from one container to another or one replication provider to another. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container 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 switchProtectionAsync(String fabricName, String protectionContainerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(switchProtectionWithServiceResponseAsync(fabricName, protectionContainerName), serviceCallback); + } + + /** + * Switches protection from one container to another or one replication provider to another. + * Operation to switch protection from one container to another or one replication provider to another. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable switchProtectionAsync(String fabricName, String protectionContainerName) { + return switchProtectionWithServiceResponseAsync(fabricName, protectionContainerName).map(new Func1, ProtectionContainerInner>() { + @Override + public ProtectionContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Switches protection from one container to another or one replication provider to another. + * Operation to switch protection from one container to another or one replication provider to another. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> switchProtectionWithServiceResponseAsync(String fabricName, String protectionContainerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName 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 SwitchProtectionInputProperties properties = null; + SwitchProtectionInput switchInput = new SwitchProtectionInput(); + switchInput.withProperties(null); + Observable> observable = service.switchProtection(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, this.client.apiVersion(), this.client.acceptLanguage(), switchInput, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Switches protection from one container to another or one replication provider to another. + * Operation to switch protection from one container to another or one replication provider to another. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param properties Switch protection properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProtectionContainerInner object if successful. + */ + public ProtectionContainerInner switchProtection(String fabricName, String protectionContainerName, SwitchProtectionInputProperties properties) { + return switchProtectionWithServiceResponseAsync(fabricName, protectionContainerName, properties).toBlocking().last().body(); + } + + /** + * Switches protection from one container to another or one replication provider to another. + * Operation to switch protection from one container to another or one replication provider to another. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param properties Switch protection properties + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture switchProtectionAsync(String fabricName, String protectionContainerName, SwitchProtectionInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(switchProtectionWithServiceResponseAsync(fabricName, protectionContainerName, properties), serviceCallback); + } + + /** + * Switches protection from one container to another or one replication provider to another. + * Operation to switch protection from one container to another or one replication provider to another. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param properties Switch protection properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable switchProtectionAsync(String fabricName, String protectionContainerName, SwitchProtectionInputProperties properties) { + return switchProtectionWithServiceResponseAsync(fabricName, protectionContainerName, properties).map(new Func1, ProtectionContainerInner>() { + @Override + public ProtectionContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Switches protection from one container to another or one replication provider to another. + * Operation to switch protection from one container to another or one replication provider to another. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param properties Switch protection properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> switchProtectionWithServiceResponseAsync(String fabricName, String protectionContainerName, SwitchProtectionInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + SwitchProtectionInput switchInput = new SwitchProtectionInput(); + switchInput.withProperties(properties); + Observable> observable = service.switchProtection(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, this.client.apiVersion(), this.client.acceptLanguage(), switchInput, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Switches protection from one container to another or one replication provider to another. + * Operation to switch protection from one container to another or one replication provider to another. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container 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 ProtectionContainerInner object if successful. + */ + public ProtectionContainerInner beginSwitchProtection(String fabricName, String protectionContainerName) { + return beginSwitchProtectionWithServiceResponseAsync(fabricName, protectionContainerName).toBlocking().single().body(); + } + + /** + * Switches protection from one container to another or one replication provider to another. + * Operation to switch protection from one container to another or one replication provider to another. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container 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 beginSwitchProtectionAsync(String fabricName, String protectionContainerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginSwitchProtectionWithServiceResponseAsync(fabricName, protectionContainerName), serviceCallback); + } + + /** + * Switches protection from one container to another or one replication provider to another. + * Operation to switch protection from one container to another or one replication provider to another. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerInner object + */ + public Observable beginSwitchProtectionAsync(String fabricName, String protectionContainerName) { + return beginSwitchProtectionWithServiceResponseAsync(fabricName, protectionContainerName).map(new Func1, ProtectionContainerInner>() { + @Override + public ProtectionContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Switches protection from one container to another or one replication provider to another. + * Operation to switch protection from one container to another or one replication provider to another. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerInner object + */ + public Observable> beginSwitchProtectionWithServiceResponseAsync(String fabricName, String protectionContainerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName 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 SwitchProtectionInputProperties properties = null; + SwitchProtectionInput switchInput = new SwitchProtectionInput(); + switchInput.withProperties(null); + return service.beginSwitchProtection(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, this.client.apiVersion(), this.client.acceptLanguage(), switchInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginSwitchProtectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Switches protection from one container to another or one replication provider to another. + * Operation to switch protection from one container to another or one replication provider to another. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param properties Switch protection properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProtectionContainerInner object if successful. + */ + public ProtectionContainerInner beginSwitchProtection(String fabricName, String protectionContainerName, SwitchProtectionInputProperties properties) { + return beginSwitchProtectionWithServiceResponseAsync(fabricName, protectionContainerName, properties).toBlocking().single().body(); + } + + /** + * Switches protection from one container to another or one replication provider to another. + * Operation to switch protection from one container to another or one replication provider to another. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param properties Switch protection properties + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginSwitchProtectionAsync(String fabricName, String protectionContainerName, SwitchProtectionInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginSwitchProtectionWithServiceResponseAsync(fabricName, protectionContainerName, properties), serviceCallback); + } + + /** + * Switches protection from one container to another or one replication provider to another. + * Operation to switch protection from one container to another or one replication provider to another. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param properties Switch protection properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerInner object + */ + public Observable beginSwitchProtectionAsync(String fabricName, String protectionContainerName, SwitchProtectionInputProperties properties) { + return beginSwitchProtectionWithServiceResponseAsync(fabricName, protectionContainerName, properties).map(new Func1, ProtectionContainerInner>() { + @Override + public ProtectionContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Switches protection from one container to another or one replication provider to another. + * Operation to switch protection from one container to another or one replication provider to another. + * + * @param fabricName Unique fabric name. + * @param protectionContainerName Protection container name. + * @param properties Switch protection properties + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerInner object + */ + public Observable> beginSwitchProtectionWithServiceResponseAsync(String fabricName, String protectionContainerName, SwitchProtectionInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + SwitchProtectionInput switchInput = new SwitchProtectionInput(); + switchInput.withProperties(properties); + return service.beginSwitchProtection(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, this.client.apiVersion(), this.client.acceptLanguage(), switchInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginSwitchProtectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginSwitchProtectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Removes a protection container. + * Operation to remove a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String fabricName, String protectionContainerName) { + deleteWithServiceResponseAsync(fabricName, protectionContainerName).toBlocking().last().body(); + } + + /** + * Removes a protection container. + * Operation to remove a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM 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 deleteAsync(String fabricName, String protectionContainerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(fabricName, protectionContainerName), serviceCallback); + } + + /** + * Removes a protection container. + * Operation to remove a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String fabricName, String protectionContainerName) { + return deleteWithServiceResponseAsync(fabricName, protectionContainerName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Removes a protection container. + * Operation to remove a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String fabricName, String protectionContainerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Removes a protection container. + * Operation to remove a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String fabricName, String protectionContainerName) { + beginDeleteWithServiceResponseAsync(fabricName, protectionContainerName).toBlocking().single().body(); + } + + /** + * Removes a protection container. + * Operation to remove a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM 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 beginDeleteAsync(String fabricName, String protectionContainerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(fabricName, protectionContainerName), serviceCallback); + } + + /** + * Removes a protection container. + * Operation to remove a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String fabricName, String protectionContainerName) { + return beginDeleteWithServiceResponseAsync(fabricName, protectionContainerName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Removes a protection container. + * Operation to remove a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String fabricName, String protectionContainerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Adds a protectable item to the replication protection container. + * The operation to a add a protectable item to a protection container(Add physical server.). + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the protection container. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProtectionContainerInner object if successful. + */ + public ProtectionContainerInner discoverProtectableItem(String fabricName, String protectionContainerName) { + return discoverProtectableItemWithServiceResponseAsync(fabricName, protectionContainerName).toBlocking().last().body(); + } + + /** + * Adds a protectable item to the replication protection container. + * The operation to a add a protectable item to a protection container(Add physical server.). + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the protection container. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture discoverProtectableItemAsync(String fabricName, String protectionContainerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(discoverProtectableItemWithServiceResponseAsync(fabricName, protectionContainerName), serviceCallback); + } + + /** + * Adds a protectable item to the replication protection container. + * The operation to a add a protectable item to a protection container(Add physical server.). + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the protection container. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable discoverProtectableItemAsync(String fabricName, String protectionContainerName) { + return discoverProtectableItemWithServiceResponseAsync(fabricName, protectionContainerName).map(new Func1, ProtectionContainerInner>() { + @Override + public ProtectionContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Adds a protectable item to the replication protection container. + * The operation to a add a protectable item to a protection container(Add physical server.). + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the protection container. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> discoverProtectableItemWithServiceResponseAsync(String fabricName, String protectionContainerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName 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 DiscoverProtectableItemRequestProperties properties = null; + DiscoverProtectableItemRequest discoverProtectableItemRequest = new DiscoverProtectableItemRequest(); + discoverProtectableItemRequest.withProperties(null); + Observable> observable = service.discoverProtectableItem(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, this.client.apiVersion(), this.client.acceptLanguage(), discoverProtectableItemRequest, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Adds a protectable item to the replication protection container. + * The operation to a add a protectable item to a protection container(Add physical server.). + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the protection container. + * @param properties The properties of a discover protectable item request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProtectionContainerInner object if successful. + */ + public ProtectionContainerInner discoverProtectableItem(String fabricName, String protectionContainerName, DiscoverProtectableItemRequestProperties properties) { + return discoverProtectableItemWithServiceResponseAsync(fabricName, protectionContainerName, properties).toBlocking().last().body(); + } + + /** + * Adds a protectable item to the replication protection container. + * The operation to a add a protectable item to a protection container(Add physical server.). + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the protection container. + * @param properties The properties of a discover protectable item request. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture discoverProtectableItemAsync(String fabricName, String protectionContainerName, DiscoverProtectableItemRequestProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(discoverProtectableItemWithServiceResponseAsync(fabricName, protectionContainerName, properties), serviceCallback); + } + + /** + * Adds a protectable item to the replication protection container. + * The operation to a add a protectable item to a protection container(Add physical server.). + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the protection container. + * @param properties The properties of a discover protectable item request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable discoverProtectableItemAsync(String fabricName, String protectionContainerName, DiscoverProtectableItemRequestProperties properties) { + return discoverProtectableItemWithServiceResponseAsync(fabricName, protectionContainerName, properties).map(new Func1, ProtectionContainerInner>() { + @Override + public ProtectionContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Adds a protectable item to the replication protection container. + * The operation to a add a protectable item to a protection container(Add physical server.). + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the protection container. + * @param properties The properties of a discover protectable item request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> discoverProtectableItemWithServiceResponseAsync(String fabricName, String protectionContainerName, DiscoverProtectableItemRequestProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + DiscoverProtectableItemRequest discoverProtectableItemRequest = new DiscoverProtectableItemRequest(); + discoverProtectableItemRequest.withProperties(properties); + Observable> observable = service.discoverProtectableItem(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, this.client.apiVersion(), this.client.acceptLanguage(), discoverProtectableItemRequest, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Adds a protectable item to the replication protection container. + * The operation to a add a protectable item to a protection container(Add physical server.). + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the protection container. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProtectionContainerInner object if successful. + */ + public ProtectionContainerInner beginDiscoverProtectableItem(String fabricName, String protectionContainerName) { + return beginDiscoverProtectableItemWithServiceResponseAsync(fabricName, protectionContainerName).toBlocking().single().body(); + } + + /** + * Adds a protectable item to the replication protection container. + * The operation to a add a protectable item to a protection container(Add physical server.). + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the protection container. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDiscoverProtectableItemAsync(String fabricName, String protectionContainerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDiscoverProtectableItemWithServiceResponseAsync(fabricName, protectionContainerName), serviceCallback); + } + + /** + * Adds a protectable item to the replication protection container. + * The operation to a add a protectable item to a protection container(Add physical server.). + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the protection container. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerInner object + */ + public Observable beginDiscoverProtectableItemAsync(String fabricName, String protectionContainerName) { + return beginDiscoverProtectableItemWithServiceResponseAsync(fabricName, protectionContainerName).map(new Func1, ProtectionContainerInner>() { + @Override + public ProtectionContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Adds a protectable item to the replication protection container. + * The operation to a add a protectable item to a protection container(Add physical server.). + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the protection container. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerInner object + */ + public Observable> beginDiscoverProtectableItemWithServiceResponseAsync(String fabricName, String protectionContainerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName 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 DiscoverProtectableItemRequestProperties properties = null; + DiscoverProtectableItemRequest discoverProtectableItemRequest = new DiscoverProtectableItemRequest(); + discoverProtectableItemRequest.withProperties(null); + return service.beginDiscoverProtectableItem(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, this.client.apiVersion(), this.client.acceptLanguage(), discoverProtectableItemRequest, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDiscoverProtectableItemDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Adds a protectable item to the replication protection container. + * The operation to a add a protectable item to a protection container(Add physical server.). + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the protection container. + * @param properties The properties of a discover protectable item request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProtectionContainerInner object if successful. + */ + public ProtectionContainerInner beginDiscoverProtectableItem(String fabricName, String protectionContainerName, DiscoverProtectableItemRequestProperties properties) { + return beginDiscoverProtectableItemWithServiceResponseAsync(fabricName, protectionContainerName, properties).toBlocking().single().body(); + } + + /** + * Adds a protectable item to the replication protection container. + * The operation to a add a protectable item to a protection container(Add physical server.). + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the protection container. + * @param properties The properties of a discover protectable item request. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDiscoverProtectableItemAsync(String fabricName, String protectionContainerName, DiscoverProtectableItemRequestProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDiscoverProtectableItemWithServiceResponseAsync(fabricName, protectionContainerName, properties), serviceCallback); + } + + /** + * Adds a protectable item to the replication protection container. + * The operation to a add a protectable item to a protection container(Add physical server.). + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the protection container. + * @param properties The properties of a discover protectable item request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerInner object + */ + public Observable beginDiscoverProtectableItemAsync(String fabricName, String protectionContainerName, DiscoverProtectableItemRequestProperties properties) { + return beginDiscoverProtectableItemWithServiceResponseAsync(fabricName, protectionContainerName, properties).map(new Func1, ProtectionContainerInner>() { + @Override + public ProtectionContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Adds a protectable item to the replication protection container. + * The operation to a add a protectable item to a protection container(Add physical server.). + * + * @param fabricName The name of the fabric. + * @param protectionContainerName The name of the protection container. + * @param properties The properties of a discover protectable item request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerInner object + */ + public Observable> beginDiscoverProtectableItemWithServiceResponseAsync(String fabricName, String protectionContainerName, DiscoverProtectableItemRequestProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + DiscoverProtectableItemRequest discoverProtectableItemRequest = new DiscoverProtectableItemRequest(); + discoverProtectableItemRequest.withProperties(properties); + return service.beginDiscoverProtectableItem(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, this.client.apiVersion(), this.client.acceptLanguage(), discoverProtectableItemRequest, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDiscoverProtectableItemDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDiscoverProtectableItemDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the protection container details. + * Gets the details of a protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container 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 ProtectionContainerInner object if successful. + */ + public ProtectionContainerInner get(String fabricName, String protectionContainerName) { + return getWithServiceResponseAsync(fabricName, protectionContainerName).toBlocking().single().body(); + } + + /** + * Gets the protection container details. + * Gets the details of a protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container 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 getAsync(String fabricName, String protectionContainerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(fabricName, protectionContainerName), serviceCallback); + } + + /** + * Gets the protection container details. + * Gets the details of a protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerInner object + */ + public Observable getAsync(String fabricName, String protectionContainerName) { + return getWithServiceResponseAsync(fabricName, protectionContainerName).map(new Func1, ProtectionContainerInner>() { + @Override + public ProtectionContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the protection container details. + * Gets the details of a protection container. + * + * @param fabricName Fabric name. + * @param protectionContainerName Protection container name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerInner object + */ + public Observable> getWithServiceResponseAsync(String fabricName, String protectionContainerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required 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(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, 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); + } + + /** + * Create a protection container. + * Operation to create a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM 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 ProtectionContainerInner object if successful. + */ + public ProtectionContainerInner create(String fabricName, String protectionContainerName) { + return createWithServiceResponseAsync(fabricName, protectionContainerName).toBlocking().last().body(); + } + + /** + * Create a protection container. + * Operation to create a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM 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 createAsync(String fabricName, String protectionContainerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(fabricName, protectionContainerName), serviceCallback); + } + + /** + * Create a protection container. + * Operation to create a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String fabricName, String protectionContainerName) { + return createWithServiceResponseAsync(fabricName, protectionContainerName).map(new Func1, ProtectionContainerInner>() { + @Override + public ProtectionContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a protection container. + * Operation to create a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String fabricName, String protectionContainerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName 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 CreateProtectionContainerInputProperties properties = null; + CreateProtectionContainerInput creationInput = new CreateProtectionContainerInput(); + creationInput.withProperties(null); + Observable> observable = service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, this.client.apiVersion(), this.client.acceptLanguage(), creationInput, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Create a protection container. + * Operation to create a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @param properties Create protection container input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProtectionContainerInner object if successful. + */ + public ProtectionContainerInner create(String fabricName, String protectionContainerName, CreateProtectionContainerInputProperties properties) { + return createWithServiceResponseAsync(fabricName, protectionContainerName, properties).toBlocking().last().body(); + } + + /** + * Create a protection container. + * Operation to create a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @param properties Create protection container input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String fabricName, String protectionContainerName, CreateProtectionContainerInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(fabricName, protectionContainerName, properties), serviceCallback); + } + + /** + * Create a protection container. + * Operation to create a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @param properties Create protection container input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String fabricName, String protectionContainerName, CreateProtectionContainerInputProperties properties) { + return createWithServiceResponseAsync(fabricName, protectionContainerName, properties).map(new Func1, ProtectionContainerInner>() { + @Override + public ProtectionContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a protection container. + * Operation to create a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @param properties Create protection container input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String fabricName, String protectionContainerName, CreateProtectionContainerInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + CreateProtectionContainerInput creationInput = new CreateProtectionContainerInput(); + creationInput.withProperties(properties); + Observable> observable = service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, this.client.apiVersion(), this.client.acceptLanguage(), creationInput, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create a protection container. + * Operation to create a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM 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 ProtectionContainerInner object if successful. + */ + public ProtectionContainerInner beginCreate(String fabricName, String protectionContainerName) { + return beginCreateWithServiceResponseAsync(fabricName, protectionContainerName).toBlocking().single().body(); + } + + /** + * Create a protection container. + * Operation to create a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM 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 beginCreateAsync(String fabricName, String protectionContainerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(fabricName, protectionContainerName), serviceCallback); + } + + /** + * Create a protection container. + * Operation to create a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerInner object + */ + public Observable beginCreateAsync(String fabricName, String protectionContainerName) { + return beginCreateWithServiceResponseAsync(fabricName, protectionContainerName).map(new Func1, ProtectionContainerInner>() { + @Override + public ProtectionContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a protection container. + * Operation to create a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String fabricName, String protectionContainerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName 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 CreateProtectionContainerInputProperties properties = null; + CreateProtectionContainerInput creationInput = new CreateProtectionContainerInput(); + creationInput.withProperties(null); + return service.beginCreate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, this.client.apiVersion(), this.client.acceptLanguage(), creationInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Create a protection container. + * Operation to create a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @param properties Create protection container input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProtectionContainerInner object if successful. + */ + public ProtectionContainerInner beginCreate(String fabricName, String protectionContainerName, CreateProtectionContainerInputProperties properties) { + return beginCreateWithServiceResponseAsync(fabricName, protectionContainerName, properties).toBlocking().single().body(); + } + + /** + * Create a protection container. + * Operation to create a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @param properties Create protection container input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String fabricName, String protectionContainerName, CreateProtectionContainerInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(fabricName, protectionContainerName, properties), serviceCallback); + } + + /** + * Create a protection container. + * Operation to create a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @param properties Create protection container input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerInner object + */ + public Observable beginCreateAsync(String fabricName, String protectionContainerName, CreateProtectionContainerInputProperties properties) { + return beginCreateWithServiceResponseAsync(fabricName, protectionContainerName, properties).map(new Func1, ProtectionContainerInner>() { + @Override + public ProtectionContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a protection container. + * Operation to create a protection container. + * + * @param fabricName Unique fabric ARM name. + * @param protectionContainerName Unique protection container ARM name. + * @param properties Create protection container input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProtectionContainerInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String fabricName, String protectionContainerName, CreateProtectionContainerInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (protectionContainerName == null) { + throw new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + CreateProtectionContainerInput creationInput = new CreateProtectionContainerInput(); + creationInput.withProperties(properties); + return service.beginCreate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, protectionContainerName, this.client.apiVersion(), this.client.acceptLanguage(), creationInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the list of protection container for a fabric. + * Lists the protection containers in the specified fabric. + * + * @param fabricName Fabric 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<ProtectionContainerInner> object if successful. + */ + public PagedList listByReplicationFabrics(final String fabricName) { + ServiceResponse> response = listByReplicationFabricsSinglePageAsync(fabricName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of protection container for a fabric. + * Lists the protection containers in the specified fabric. + * + * @param fabricName Fabric 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> listByReplicationFabricsAsync(final String fabricName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationFabricsSinglePageAsync(fabricName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of protection container for a fabric. + * Lists the protection containers in the specified fabric. + * + * @param fabricName Fabric name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectionContainerInner> object + */ + public Observable> listByReplicationFabricsAsync(final String fabricName) { + return listByReplicationFabricsWithServiceResponseAsync(fabricName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of protection container for a fabric. + * Lists the protection containers in the specified fabric. + * + * @param fabricName Fabric name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectionContainerInner> object + */ + public Observable>> listByReplicationFabricsWithServiceResponseAsync(final String fabricName) { + return listByReplicationFabricsSinglePageAsync(fabricName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationFabricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of protection container for a fabric. + * Lists the protection containers in the specified fabric. + * + ServiceResponse> * @param fabricName Fabric name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProtectionContainerInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationFabricsSinglePageAsync(final String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByReplicationFabrics(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationFabricsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationFabricsDelegate(Response response) 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 list of all protection containers in a vault. + * Lists the protection containers in a vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProtectionContainerInner> 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 list of all protection containers in a vault. + * Lists the protection containers in a vault. + * + * @param serviceCallback 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 list of all protection containers in a vault. + * Lists the protection containers in a vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectionContainerInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of all protection containers in a vault. + * Lists the protection containers in a vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectionContainerInner> 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 list of all protection containers in a vault. + * Lists the protection containers in a vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProtectionContainerInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = 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 list of protection container for a fabric. + * Lists the protection containers in the specified fabric. + * + * @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<ProtectionContainerInner> object if successful. + */ + public PagedList listByReplicationFabricsNext(final String nextPageLink) { + ServiceResponse> response = listByReplicationFabricsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of protection container for a fabric. + * Lists the protection containers in the specified fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByReplicationFabricsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationFabricsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of protection container for a fabric. + * Lists the protection containers in the specified fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectionContainerInner> object + */ + public Observable> listByReplicationFabricsNextAsync(final String nextPageLink) { + return listByReplicationFabricsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of protection container for a fabric. + * Lists the protection containers in the specified fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectionContainerInner> object + */ + public Observable>> listByReplicationFabricsNextWithServiceResponseAsync(final String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationFabricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of protection container for a fabric. + * Lists the protection containers in the specified fabric. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProtectionContainerInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationFabricsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByReplicationFabricsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationFabricsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationFabricsNextDelegate(Response response) 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 list of all protection containers in a vault. + * Lists the protection containers in a vault. + * + * @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<ProtectionContainerInner> 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 list of all protection containers in a vault. + * Lists the protection containers in a vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback 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 list of all protection containers in a vault. + * Lists the protection containers in a vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectionContainerInner> 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 list of all protection containers in a vault. + * Lists the protection containers in a vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProtectionContainerInner> 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 list of all protection containers in a vault. + * Lists the protection containers in a vault. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProtectionContainerInner> 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationRecoveryPlansImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationRecoveryPlansImpl.java new file mode 100644 index 0000000000000..2f374b580d2e6 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationRecoveryPlansImpl.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPlan; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPlanTestFailoverCleanupInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPlanTestFailoverInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPlanUnplannedFailoverInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPlanPlannedFailoverInputProperties; + +class ReplicationRecoveryPlansImpl extends WrapperImpl implements ReplicationRecoveryPlans { + private final RecoveryServicesManager manager; + + ReplicationRecoveryPlansImpl(RecoveryServicesManager manager) { + super(manager.inner().replicationRecoveryPlans()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public RecoveryPlanImpl define(String name) { + return wrapModel(name); + } + + private RecoveryPlanImpl wrapModel(RecoveryPlanInner inner) { + return new RecoveryPlanImpl(inner, manager()); + } + + private RecoveryPlanImpl wrapModel(String name) { + return new RecoveryPlanImpl(name, this.manager()); + } + + @Override + public Observable reprotectAsync(String recoveryPlanName) { + ReplicationRecoveryPlansInner client = this.inner(); + return client.reprotectAsync(recoveryPlanName) + .map(new Func1() { + @Override + public RecoveryPlan call(RecoveryPlanInner inner) { + return new RecoveryPlanImpl(inner, manager()); + } + }); + } + + @Override + public Observable failoverCommitAsync(String recoveryPlanName) { + ReplicationRecoveryPlansInner client = this.inner(); + return client.failoverCommitAsync(recoveryPlanName) + .map(new Func1() { + @Override + public RecoveryPlan call(RecoveryPlanInner inner) { + return new RecoveryPlanImpl(inner, manager()); + } + }); + } + + @Override + public Observable testFailoverCleanupAsync(String recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties) { + ReplicationRecoveryPlansInner client = this.inner(); + return client.testFailoverCleanupAsync(recoveryPlanName, properties) + .map(new Func1() { + @Override + public RecoveryPlan call(RecoveryPlanInner inner) { + return new RecoveryPlanImpl(inner, manager()); + } + }); + } + + @Override + public Observable testFailoverAsync(String recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties) { + ReplicationRecoveryPlansInner client = this.inner(); + return client.testFailoverAsync(recoveryPlanName, properties) + .map(new Func1() { + @Override + public RecoveryPlan call(RecoveryPlanInner inner) { + return new RecoveryPlanImpl(inner, manager()); + } + }); + } + + @Override + public Observable unplannedFailoverAsync(String recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties) { + ReplicationRecoveryPlansInner client = this.inner(); + return client.unplannedFailoverAsync(recoveryPlanName, properties) + .map(new Func1() { + @Override + public RecoveryPlan call(RecoveryPlanInner inner) { + return new RecoveryPlanImpl(inner, manager()); + } + }); + } + + @Override + public Observable plannedFailoverAsync(String recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties) { + ReplicationRecoveryPlansInner client = this.inner(); + return client.plannedFailoverAsync(recoveryPlanName, properties) + .map(new Func1() { + @Override + public RecoveryPlan call(RecoveryPlanInner inner) { + return new RecoveryPlanImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAsync() { + ReplicationRecoveryPlansInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public RecoveryPlan call(RecoveryPlanInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String recoveryPlanName) { + ReplicationRecoveryPlansInner client = this.inner(); + return client.getAsync(recoveryPlanName) + .map(new Func1() { + @Override + public RecoveryPlan call(RecoveryPlanInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String recoveryPlanName) { + ReplicationRecoveryPlansInner client = this.inner(); + return client.deleteAsync(recoveryPlanName).toCompletable(); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationRecoveryPlansInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationRecoveryPlansInner.java new file mode 100644 index 0000000000000..0949803c18ca4 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationRecoveryPlansInner.java @@ -0,0 +1,2216 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.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.management.recoveryservicessiterecovery.v2018_01_10.CreateRecoveryPlanInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.CreateRecoveryPlanInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPlanPlannedFailoverInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPlanPlannedFailoverInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPlanTestFailoverCleanupInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPlanTestFailoverCleanupInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPlanTestFailoverInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPlanTestFailoverInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPlanUnplannedFailoverInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryPlanUnplannedFailoverInputProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.UpdateRecoveryPlanInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.UpdateRecoveryPlanInputProperties; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ReplicationRecoveryPlans. + */ +public class ReplicationRecoveryPlansInner { + /** The Retrofit service to perform REST calls. */ + private ReplicationRecoveryPlansService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationRecoveryPlansInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReplicationRecoveryPlansInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(ReplicationRecoveryPlansService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReplicationRecoveryPlans to be + * used by Retrofit to perform actually REST calls. + */ + interface ReplicationRecoveryPlansService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans reprotect" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/reProtect") + Observable> reprotect(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans beginReprotect" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/reProtect") + Observable> beginReprotect(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans failoverCommit" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/failoverCommit") + Observable> failoverCommit(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans beginFailoverCommit" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/failoverCommit") + Observable> beginFailoverCommit(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans testFailoverCleanup" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailoverCleanup") + Observable> testFailoverCleanup(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RecoveryPlanTestFailoverCleanupInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans beginTestFailoverCleanup" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailoverCleanup") + Observable> beginTestFailoverCleanup(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RecoveryPlanTestFailoverCleanupInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans testFailover" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailover") + Observable> testFailover(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RecoveryPlanTestFailoverInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans beginTestFailover" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailover") + Observable> beginTestFailover(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RecoveryPlanTestFailoverInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans unplannedFailover" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/unplannedFailover") + Observable> unplannedFailover(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RecoveryPlanUnplannedFailoverInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans beginUnplannedFailover" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/unplannedFailover") + Observable> beginUnplannedFailover(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RecoveryPlanUnplannedFailoverInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans plannedFailover" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/plannedFailover") + Observable> plannedFailover(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RecoveryPlanPlannedFailoverInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans beginPlannedFailover" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/plannedFailover") + Observable> beginPlannedFailover(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RecoveryPlanPlannedFailoverInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans create" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}") + Observable> create(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CreateRecoveryPlanInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans beginCreate" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}") + Observable> beginCreate(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CreateRecoveryPlanInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans delete" }) + @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans beginDelete" }) + @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans update" }) + @PATCH("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}") + Observable> update(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UpdateRecoveryPlanInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans beginUpdate" }) + @PATCH("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}") + Observable> beginUpdate(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("recoveryPlanName") String recoveryPlanName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UpdateRecoveryPlanInput input, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans list" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans") + Observable> list(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryPlans listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Execute reprotect of the recovery plan. + * The operation to reprotect(reverse replicate) a recovery plan. + * + * @param recoveryPlanName Recovery plan 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 RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner reprotect(String recoveryPlanName) { + return reprotectWithServiceResponseAsync(recoveryPlanName).toBlocking().last().body(); + } + + /** + * Execute reprotect of the recovery plan. + * The operation to reprotect(reverse replicate) a recovery plan. + * + * @param recoveryPlanName Recovery plan 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 reprotectAsync(String recoveryPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(reprotectWithServiceResponseAsync(recoveryPlanName), serviceCallback); + } + + /** + * Execute reprotect of the recovery plan. + * The operation to reprotect(reverse replicate) a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable reprotectAsync(String recoveryPlanName) { + return reprotectWithServiceResponseAsync(recoveryPlanName).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute reprotect of the recovery plan. + * The operation to reprotect(reverse replicate) a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> reprotectWithServiceResponseAsync(String recoveryPlanName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.reprotect(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Execute reprotect of the recovery plan. + * The operation to reprotect(reverse replicate) a recovery plan. + * + * @param recoveryPlanName Recovery plan 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 RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner beginReprotect(String recoveryPlanName) { + return beginReprotectWithServiceResponseAsync(recoveryPlanName).toBlocking().single().body(); + } + + /** + * Execute reprotect of the recovery plan. + * The operation to reprotect(reverse replicate) a recovery plan. + * + * @param recoveryPlanName Recovery plan 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 beginReprotectAsync(String recoveryPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginReprotectWithServiceResponseAsync(recoveryPlanName), serviceCallback); + } + + /** + * Execute reprotect of the recovery plan. + * The operation to reprotect(reverse replicate) a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable beginReprotectAsync(String recoveryPlanName) { + return beginReprotectWithServiceResponseAsync(recoveryPlanName).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute reprotect of the recovery plan. + * The operation to reprotect(reverse replicate) a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable> beginReprotectWithServiceResponseAsync(String recoveryPlanName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginReprotect(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginReprotectDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginReprotectDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Execute commit failover of the recovery plan. + * The operation to commit the fail over of a recovery plan. + * + * @param recoveryPlanName Recovery plan 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 RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner failoverCommit(String recoveryPlanName) { + return failoverCommitWithServiceResponseAsync(recoveryPlanName).toBlocking().last().body(); + } + + /** + * Execute commit failover of the recovery plan. + * The operation to commit the fail over of a recovery plan. + * + * @param recoveryPlanName Recovery plan 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 failoverCommitAsync(String recoveryPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(failoverCommitWithServiceResponseAsync(recoveryPlanName), serviceCallback); + } + + /** + * Execute commit failover of the recovery plan. + * The operation to commit the fail over of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable failoverCommitAsync(String recoveryPlanName) { + return failoverCommitWithServiceResponseAsync(recoveryPlanName).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute commit failover of the recovery plan. + * The operation to commit the fail over of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> failoverCommitWithServiceResponseAsync(String recoveryPlanName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.failoverCommit(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Execute commit failover of the recovery plan. + * The operation to commit the fail over of a recovery plan. + * + * @param recoveryPlanName Recovery plan 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 RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner beginFailoverCommit(String recoveryPlanName) { + return beginFailoverCommitWithServiceResponseAsync(recoveryPlanName).toBlocking().single().body(); + } + + /** + * Execute commit failover of the recovery plan. + * The operation to commit the fail over of a recovery plan. + * + * @param recoveryPlanName Recovery plan 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 beginFailoverCommitAsync(String recoveryPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginFailoverCommitWithServiceResponseAsync(recoveryPlanName), serviceCallback); + } + + /** + * Execute commit failover of the recovery plan. + * The operation to commit the fail over of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable beginFailoverCommitAsync(String recoveryPlanName) { + return beginFailoverCommitWithServiceResponseAsync(recoveryPlanName).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute commit failover of the recovery plan. + * The operation to commit the fail over of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable> beginFailoverCommitWithServiceResponseAsync(String recoveryPlanName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginFailoverCommit(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginFailoverCommitDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginFailoverCommitDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Execute test failover cleanup of the recovery plan. + * The operation to cleanup test failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan test failover cleanup input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner testFailoverCleanup(String recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties) { + return testFailoverCleanupWithServiceResponseAsync(recoveryPlanName, properties).toBlocking().last().body(); + } + + /** + * Execute test failover cleanup of the recovery plan. + * The operation to cleanup test failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan test failover cleanup input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture testFailoverCleanupAsync(String recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(testFailoverCleanupWithServiceResponseAsync(recoveryPlanName, properties), serviceCallback); + } + + /** + * Execute test failover cleanup of the recovery plan. + * The operation to cleanup test failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan test failover cleanup input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable testFailoverCleanupAsync(String recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties) { + return testFailoverCleanupWithServiceResponseAsync(recoveryPlanName, properties).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute test failover cleanup of the recovery plan. + * The operation to cleanup test failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan test failover cleanup input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> testFailoverCleanupWithServiceResponseAsync(String recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (properties == null) { + throw new IllegalArgumentException("Parameter properties is required and cannot be null."); + } + Validator.validate(properties); + RecoveryPlanTestFailoverCleanupInput input = new RecoveryPlanTestFailoverCleanupInput(); + input.withProperties(properties); + Observable> observable = service.testFailoverCleanup(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Execute test failover cleanup of the recovery plan. + * The operation to cleanup test failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan test failover cleanup input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner beginTestFailoverCleanup(String recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties) { + return beginTestFailoverCleanupWithServiceResponseAsync(recoveryPlanName, properties).toBlocking().single().body(); + } + + /** + * Execute test failover cleanup of the recovery plan. + * The operation to cleanup test failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan test failover cleanup input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginTestFailoverCleanupAsync(String recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginTestFailoverCleanupWithServiceResponseAsync(recoveryPlanName, properties), serviceCallback); + } + + /** + * Execute test failover cleanup of the recovery plan. + * The operation to cleanup test failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan test failover cleanup input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable beginTestFailoverCleanupAsync(String recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties) { + return beginTestFailoverCleanupWithServiceResponseAsync(recoveryPlanName, properties).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute test failover cleanup of the recovery plan. + * The operation to cleanup test failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan test failover cleanup input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable> beginTestFailoverCleanupWithServiceResponseAsync(String recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (properties == null) { + throw new IllegalArgumentException("Parameter properties is required and cannot be null."); + } + Validator.validate(properties); + RecoveryPlanTestFailoverCleanupInput input = new RecoveryPlanTestFailoverCleanupInput(); + input.withProperties(properties); + return service.beginTestFailoverCleanup(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginTestFailoverCleanupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginTestFailoverCleanupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Execute test failover of the recovery plan. + * The operation to start the test failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan test failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner testFailover(String recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties) { + return testFailoverWithServiceResponseAsync(recoveryPlanName, properties).toBlocking().last().body(); + } + + /** + * Execute test failover of the recovery plan. + * The operation to start the test failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan test failover input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture testFailoverAsync(String recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(testFailoverWithServiceResponseAsync(recoveryPlanName, properties), serviceCallback); + } + + /** + * Execute test failover of the recovery plan. + * The operation to start the test failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan test failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable testFailoverAsync(String recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties) { + return testFailoverWithServiceResponseAsync(recoveryPlanName, properties).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute test failover of the recovery plan. + * The operation to start the test failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan test failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> testFailoverWithServiceResponseAsync(String recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (properties == null) { + throw new IllegalArgumentException("Parameter properties is required and cannot be null."); + } + Validator.validate(properties); + RecoveryPlanTestFailoverInput input = new RecoveryPlanTestFailoverInput(); + input.withProperties(properties); + Observable> observable = service.testFailover(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Execute test failover of the recovery plan. + * The operation to start the test failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan test failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner beginTestFailover(String recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties) { + return beginTestFailoverWithServiceResponseAsync(recoveryPlanName, properties).toBlocking().single().body(); + } + + /** + * Execute test failover of the recovery plan. + * The operation to start the test failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan test failover input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginTestFailoverAsync(String recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginTestFailoverWithServiceResponseAsync(recoveryPlanName, properties), serviceCallback); + } + + /** + * Execute test failover of the recovery plan. + * The operation to start the test failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan test failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable beginTestFailoverAsync(String recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties) { + return beginTestFailoverWithServiceResponseAsync(recoveryPlanName, properties).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute test failover of the recovery plan. + * The operation to start the test failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan test failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable> beginTestFailoverWithServiceResponseAsync(String recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (properties == null) { + throw new IllegalArgumentException("Parameter properties is required and cannot be null."); + } + Validator.validate(properties); + RecoveryPlanTestFailoverInput input = new RecoveryPlanTestFailoverInput(); + input.withProperties(properties); + return service.beginTestFailover(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginTestFailoverDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginTestFailoverDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Execute unplanned failover of the recovery plan. + * The operation to start the failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan unplanned failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner unplannedFailover(String recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties) { + return unplannedFailoverWithServiceResponseAsync(recoveryPlanName, properties).toBlocking().last().body(); + } + + /** + * Execute unplanned failover of the recovery plan. + * The operation to start the failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan unplanned failover input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture unplannedFailoverAsync(String recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(unplannedFailoverWithServiceResponseAsync(recoveryPlanName, properties), serviceCallback); + } + + /** + * Execute unplanned failover of the recovery plan. + * The operation to start the failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan unplanned failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable unplannedFailoverAsync(String recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties) { + return unplannedFailoverWithServiceResponseAsync(recoveryPlanName, properties).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute unplanned failover of the recovery plan. + * The operation to start the failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan unplanned failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> unplannedFailoverWithServiceResponseAsync(String recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (properties == null) { + throw new IllegalArgumentException("Parameter properties is required and cannot be null."); + } + Validator.validate(properties); + RecoveryPlanUnplannedFailoverInput input = new RecoveryPlanUnplannedFailoverInput(); + input.withProperties(properties); + Observable> observable = service.unplannedFailover(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Execute unplanned failover of the recovery plan. + * The operation to start the failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan unplanned failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner beginUnplannedFailover(String recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties) { + return beginUnplannedFailoverWithServiceResponseAsync(recoveryPlanName, properties).toBlocking().single().body(); + } + + /** + * Execute unplanned failover of the recovery plan. + * The operation to start the failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan unplanned failover input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUnplannedFailoverAsync(String recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUnplannedFailoverWithServiceResponseAsync(recoveryPlanName, properties), serviceCallback); + } + + /** + * Execute unplanned failover of the recovery plan. + * The operation to start the failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan unplanned failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable beginUnplannedFailoverAsync(String recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties) { + return beginUnplannedFailoverWithServiceResponseAsync(recoveryPlanName, properties).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute unplanned failover of the recovery plan. + * The operation to start the failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan unplanned failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable> beginUnplannedFailoverWithServiceResponseAsync(String recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (properties == null) { + throw new IllegalArgumentException("Parameter properties is required and cannot be null."); + } + Validator.validate(properties); + RecoveryPlanUnplannedFailoverInput input = new RecoveryPlanUnplannedFailoverInput(); + input.withProperties(properties); + return service.beginUnplannedFailover(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUnplannedFailoverDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUnplannedFailoverDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Execute planned failover of the recovery plan. + * The operation to start the planned failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan planned failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner plannedFailover(String recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties) { + return plannedFailoverWithServiceResponseAsync(recoveryPlanName, properties).toBlocking().last().body(); + } + + /** + * Execute planned failover of the recovery plan. + * The operation to start the planned failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan planned failover input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture plannedFailoverAsync(String recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(plannedFailoverWithServiceResponseAsync(recoveryPlanName, properties), serviceCallback); + } + + /** + * Execute planned failover of the recovery plan. + * The operation to start the planned failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan planned failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable plannedFailoverAsync(String recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties) { + return plannedFailoverWithServiceResponseAsync(recoveryPlanName, properties).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute planned failover of the recovery plan. + * The operation to start the planned failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan planned failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> plannedFailoverWithServiceResponseAsync(String recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (properties == null) { + throw new IllegalArgumentException("Parameter properties is required and cannot be null."); + } + Validator.validate(properties); + RecoveryPlanPlannedFailoverInput input = new RecoveryPlanPlannedFailoverInput(); + input.withProperties(properties); + Observable> observable = service.plannedFailover(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Execute planned failover of the recovery plan. + * The operation to start the planned failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan planned failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner beginPlannedFailover(String recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties) { + return beginPlannedFailoverWithServiceResponseAsync(recoveryPlanName, properties).toBlocking().single().body(); + } + + /** + * Execute planned failover of the recovery plan. + * The operation to start the planned failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan planned failover input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginPlannedFailoverAsync(String recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginPlannedFailoverWithServiceResponseAsync(recoveryPlanName, properties), serviceCallback); + } + + /** + * Execute planned failover of the recovery plan. + * The operation to start the planned failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan planned failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable beginPlannedFailoverAsync(String recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties) { + return beginPlannedFailoverWithServiceResponseAsync(recoveryPlanName, properties).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute planned failover of the recovery plan. + * The operation to start the planned failover of a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties The recovery plan planned failover input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable> beginPlannedFailoverWithServiceResponseAsync(String recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (properties == null) { + throw new IllegalArgumentException("Parameter properties is required and cannot be null."); + } + Validator.validate(properties); + RecoveryPlanPlannedFailoverInput input = new RecoveryPlanPlannedFailoverInput(); + input.withProperties(properties); + return service.beginPlannedFailover(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginPlannedFailoverDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginPlannedFailoverDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the requested recovery plan. + * Gets the details of the recovery plan. + * + * @param recoveryPlanName Name of the recovery plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner get(String recoveryPlanName) { + return getWithServiceResponseAsync(recoveryPlanName).toBlocking().single().body(); + } + + /** + * Gets the requested recovery plan. + * Gets the details of the recovery plan. + * + * @param recoveryPlanName Name of the recovery plan. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String recoveryPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(recoveryPlanName), serviceCallback); + } + + /** + * Gets the requested recovery plan. + * Gets the details of the recovery plan. + * + * @param recoveryPlanName Name of the recovery plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable getAsync(String recoveryPlanName) { + return getWithServiceResponseAsync(recoveryPlanName).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the requested recovery plan. + * Gets the details of the recovery plan. + * + * @param recoveryPlanName Name of the recovery plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable> getWithServiceResponseAsync(String recoveryPlanName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required 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(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, 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); + } + + /** + * Creates a recovery plan with the given details. + * The operation to create a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties Recovery plan creation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner create(String recoveryPlanName, CreateRecoveryPlanInputProperties properties) { + return createWithServiceResponseAsync(recoveryPlanName, properties).toBlocking().last().body(); + } + + /** + * Creates a recovery plan with the given details. + * The operation to create a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties Recovery plan creation properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String recoveryPlanName, CreateRecoveryPlanInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(recoveryPlanName, properties), serviceCallback); + } + + /** + * Creates a recovery plan with the given details. + * The operation to create a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties Recovery plan creation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String recoveryPlanName, CreateRecoveryPlanInputProperties properties) { + return createWithServiceResponseAsync(recoveryPlanName, properties).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a recovery plan with the given details. + * The operation to create a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties Recovery plan creation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String recoveryPlanName, CreateRecoveryPlanInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (properties == null) { + throw new IllegalArgumentException("Parameter properties is required and cannot be null."); + } + Validator.validate(properties); + CreateRecoveryPlanInput input = new CreateRecoveryPlanInput(); + input.withProperties(properties); + Observable> observable = service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates a recovery plan with the given details. + * The operation to create a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties Recovery plan creation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner beginCreate(String recoveryPlanName, CreateRecoveryPlanInputProperties properties) { + return beginCreateWithServiceResponseAsync(recoveryPlanName, properties).toBlocking().single().body(); + } + + /** + * Creates a recovery plan with the given details. + * The operation to create a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties Recovery plan creation properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String recoveryPlanName, CreateRecoveryPlanInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(recoveryPlanName, properties), serviceCallback); + } + + /** + * Creates a recovery plan with the given details. + * The operation to create a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties Recovery plan creation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable beginCreateAsync(String recoveryPlanName, CreateRecoveryPlanInputProperties properties) { + return beginCreateWithServiceResponseAsync(recoveryPlanName, properties).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a recovery plan with the given details. + * The operation to create a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties Recovery plan creation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String recoveryPlanName, CreateRecoveryPlanInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (properties == null) { + throw new IllegalArgumentException("Parameter properties is required and cannot be null."); + } + Validator.validate(properties); + CreateRecoveryPlanInput input = new CreateRecoveryPlanInput(); + input.withProperties(properties); + return service.beginCreate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the specified recovery plan. + * Delete a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String recoveryPlanName) { + deleteWithServiceResponseAsync(recoveryPlanName).toBlocking().last().body(); + } + + /** + * Deletes the specified recovery plan. + * Delete a recovery plan. + * + * @param recoveryPlanName Recovery plan 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 deleteAsync(String recoveryPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(recoveryPlanName), serviceCallback); + } + + /** + * Deletes the specified recovery plan. + * Delete a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String recoveryPlanName) { + return deleteWithServiceResponseAsync(recoveryPlanName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified recovery plan. + * Delete a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String recoveryPlanName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified recovery plan. + * Delete a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String recoveryPlanName) { + beginDeleteWithServiceResponseAsync(recoveryPlanName).toBlocking().single().body(); + } + + /** + * Deletes the specified recovery plan. + * Delete a recovery plan. + * + * @param recoveryPlanName Recovery plan 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 beginDeleteAsync(String recoveryPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(recoveryPlanName), serviceCallback); + } + + /** + * Deletes the specified recovery plan. + * Delete a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String recoveryPlanName) { + return beginDeleteWithServiceResponseAsync(recoveryPlanName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified recovery plan. + * Delete a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String recoveryPlanName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the given recovery plan. + * The operation to update a recovery plan. + * + * @param recoveryPlanName Recovery plan 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 RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner update(String recoveryPlanName) { + return updateWithServiceResponseAsync(recoveryPlanName).toBlocking().last().body(); + } + + /** + * Updates the given recovery plan. + * The operation to update a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String recoveryPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(recoveryPlanName), serviceCallback); + } + + /** + * Updates the given recovery plan. + * The operation to update a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String recoveryPlanName) { + return updateWithServiceResponseAsync(recoveryPlanName).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the given recovery plan. + * The operation to update a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String recoveryPlanName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName 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 UpdateRecoveryPlanInputProperties properties = null; + UpdateRecoveryPlanInput input = new UpdateRecoveryPlanInput(); + input.withProperties(null); + Observable> observable = service.update(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates the given recovery plan. + * The operation to update a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties Recovery plan update properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner update(String recoveryPlanName, UpdateRecoveryPlanInputProperties properties) { + return updateWithServiceResponseAsync(recoveryPlanName, properties).toBlocking().last().body(); + } + + /** + * Updates the given recovery plan. + * The operation to update a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties Recovery plan update properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String recoveryPlanName, UpdateRecoveryPlanInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(recoveryPlanName, properties), serviceCallback); + } + + /** + * Updates the given recovery plan. + * The operation to update a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties Recovery plan update properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String recoveryPlanName, UpdateRecoveryPlanInputProperties properties) { + return updateWithServiceResponseAsync(recoveryPlanName, properties).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the given recovery plan. + * The operation to update a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties Recovery plan update properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String recoveryPlanName, UpdateRecoveryPlanInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + UpdateRecoveryPlanInput input = new UpdateRecoveryPlanInput(); + input.withProperties(properties); + Observable> observable = service.update(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates the given recovery plan. + * The operation to update a recovery plan. + * + * @param recoveryPlanName Recovery plan 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 RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner beginUpdate(String recoveryPlanName) { + return beginUpdateWithServiceResponseAsync(recoveryPlanName).toBlocking().single().body(); + } + + /** + * Updates the given recovery plan. + * The operation to update a recovery plan. + * + * @param recoveryPlanName Recovery plan 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 beginUpdateAsync(String recoveryPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(recoveryPlanName), serviceCallback); + } + + /** + * Updates the given recovery plan. + * The operation to update a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable beginUpdateAsync(String recoveryPlanName) { + return beginUpdateWithServiceResponseAsync(recoveryPlanName).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the given recovery plan. + * The operation to update a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String recoveryPlanName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName 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 UpdateRecoveryPlanInputProperties properties = null; + UpdateRecoveryPlanInput input = new UpdateRecoveryPlanInput(); + input.withProperties(null); + return service.beginUpdate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates the given recovery plan. + * The operation to update a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties Recovery plan update properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RecoveryPlanInner object if successful. + */ + public RecoveryPlanInner beginUpdate(String recoveryPlanName, UpdateRecoveryPlanInputProperties properties) { + return beginUpdateWithServiceResponseAsync(recoveryPlanName, properties).toBlocking().single().body(); + } + + /** + * Updates the given recovery plan. + * The operation to update a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties Recovery plan update properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAsync(String recoveryPlanName, UpdateRecoveryPlanInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(recoveryPlanName, properties), serviceCallback); + } + + /** + * Updates the given recovery plan. + * The operation to update a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties Recovery plan update properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable beginUpdateAsync(String recoveryPlanName, UpdateRecoveryPlanInputProperties properties) { + return beginUpdateWithServiceResponseAsync(recoveryPlanName, properties).map(new Func1, RecoveryPlanInner>() { + @Override + public RecoveryPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the given recovery plan. + * The operation to update a recovery plan. + * + * @param recoveryPlanName Recovery plan name. + * @param properties Recovery plan update properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryPlanInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String recoveryPlanName, UpdateRecoveryPlanInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (recoveryPlanName == null) { + throw new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + UpdateRecoveryPlanInput input = new UpdateRecoveryPlanInput(); + input.withProperties(properties); + return service.beginUpdate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), recoveryPlanName, this.client.apiVersion(), this.client.acceptLanguage(), input, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the list of recovery plans. + * Lists the recovery plans in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<RecoveryPlanInner> 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 list of recovery plans. + * Lists the recovery plans in the vault. + * + * @param serviceCallback 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 list of recovery plans. + * Lists the recovery plans in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecoveryPlanInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of recovery plans. + * Lists the recovery plans in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecoveryPlanInner> 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 list of recovery plans. + * Lists the recovery plans in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RecoveryPlanInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = 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 list of recovery plans. + * Lists the recovery plans in the vault. + * + * @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<RecoveryPlanInner> 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 list of recovery plans. + * Lists the recovery plans in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback 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 list of recovery plans. + * Lists the recovery plans in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecoveryPlanInner> 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 list of recovery plans. + * Lists the recovery plans in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecoveryPlanInner> 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 list of recovery plans. + * Lists the recovery plans in the vault. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RecoveryPlanInner> 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationRecoveryServicesProvidersImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationRecoveryServicesProvidersImpl.java new file mode 100644 index 0000000000000..6520f53740386 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationRecoveryServicesProvidersImpl.java @@ -0,0 +1,108 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryServicesProviders; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.RecoveryServicesProvider; + +class ReplicationRecoveryServicesProvidersImpl extends WrapperImpl implements ReplicationRecoveryServicesProviders { + private final RecoveryServicesManager manager; + + ReplicationRecoveryServicesProvidersImpl(RecoveryServicesManager manager) { + super(manager.inner().replicationRecoveryServicesProviders()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + private RecoveryServicesProviderImpl wrapModel(RecoveryServicesProviderInner inner) { + return new RecoveryServicesProviderImpl(inner, manager()); + } + + @Override + public Observable refreshProviderAsync(String fabricName, String providerName) { + ReplicationRecoveryServicesProvidersInner client = this.inner(); + return client.refreshProviderAsync(fabricName, providerName) + .map(new Func1() { + @Override + public RecoveryServicesProvider call(RecoveryServicesProviderInner inner) { + return new RecoveryServicesProviderImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteAsync(String fabricName, String providerName) { + ReplicationRecoveryServicesProvidersInner client = this.inner(); + return client.deleteAsync(fabricName, providerName).toCompletable(); + } + + @Override + public Observable listAsync() { + ReplicationRecoveryServicesProvidersInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public RecoveryServicesProvider call(RecoveryServicesProviderInner inner) { + return new RecoveryServicesProviderImpl(inner, manager()); + } + }); + } + + @Override + public Observable listByReplicationFabricsAsync(final String fabricName) { + ReplicationRecoveryServicesProvidersInner client = this.inner(); + return client.listByReplicationFabricsAsync(fabricName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public RecoveryServicesProvider call(RecoveryServicesProviderInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String fabricName, String providerName) { + ReplicationRecoveryServicesProvidersInner client = this.inner(); + return client.getAsync(fabricName, providerName) + .map(new Func1() { + @Override + public RecoveryServicesProvider call(RecoveryServicesProviderInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable purgeAsync(String fabricName, String providerName) { + ReplicationRecoveryServicesProvidersInner client = this.inner(); + return client.purgeAsync(fabricName, providerName).toCompletable(); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationRecoveryServicesProvidersInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationRecoveryServicesProvidersInner.java new file mode 100644 index 0000000000000..2bccd7ab70114 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationRecoveryServicesProvidersInner.java @@ -0,0 +1,1205 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.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 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.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 ReplicationRecoveryServicesProviders. + */ +public class ReplicationRecoveryServicesProvidersInner implements InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private ReplicationRecoveryServicesProvidersService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationRecoveryServicesProvidersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReplicationRecoveryServicesProvidersInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(ReplicationRecoveryServicesProvidersService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReplicationRecoveryServicesProviders to be + * used by Retrofit to perform actually REST calls. + */ + interface ReplicationRecoveryServicesProvidersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryServicesProviders refreshProvider" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/refreshProvider") + Observable> refreshProvider(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("providerName") String providerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryServicesProviders beginRefreshProvider" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/refreshProvider") + Observable> beginRefreshProvider(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("providerName") String providerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryServicesProviders delete" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/remove") + Observable> delete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("providerName") String providerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryServicesProviders beginDelete" }) + @POST("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/remove") + Observable> beginDelete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("providerName") String providerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryServicesProviders get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("providerName") String providerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryServicesProviders purge" }) + @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}", method = "DELETE", hasBody = true) + Observable> purge(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("providerName") String providerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryServicesProviders beginPurge" }) + @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}", method = "DELETE", hasBody = true) + Observable> beginPurge(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("providerName") String providerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryServicesProviders listByReplicationFabrics" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders") + Observable> listByReplicationFabrics(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryServicesProviders list" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryServicesProviders") + Observable> list(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryServicesProviders listByReplicationFabricsNext" }) + @GET + Observable> listByReplicationFabricsNext(@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.recoveryservicessiterecovery.v2018_01_10.ReplicationRecoveryServicesProviders listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Refresh details from the recovery services provider. + * The operation to refresh the information from the recovery services provider. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider 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 RecoveryServicesProviderInner object if successful. + */ + public RecoveryServicesProviderInner refreshProvider(String fabricName, String providerName) { + return refreshProviderWithServiceResponseAsync(fabricName, providerName).toBlocking().last().body(); + } + + /** + * Refresh details from the recovery services provider. + * The operation to refresh the information from the recovery services provider. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider 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 refreshProviderAsync(String fabricName, String providerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(refreshProviderWithServiceResponseAsync(fabricName, providerName), serviceCallback); + } + + /** + * Refresh details from the recovery services provider. + * The operation to refresh the information from the recovery services provider. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable refreshProviderAsync(String fabricName, String providerName) { + return refreshProviderWithServiceResponseAsync(fabricName, providerName).map(new Func1, RecoveryServicesProviderInner>() { + @Override + public RecoveryServicesProviderInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Refresh details from the recovery services provider. + * The operation to refresh the information from the recovery services provider. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> refreshProviderWithServiceResponseAsync(String fabricName, String providerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (providerName == null) { + throw new IllegalArgumentException("Parameter providerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.refreshProvider(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, providerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Refresh details from the recovery services provider. + * The operation to refresh the information from the recovery services provider. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider 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 RecoveryServicesProviderInner object if successful. + */ + public RecoveryServicesProviderInner beginRefreshProvider(String fabricName, String providerName) { + return beginRefreshProviderWithServiceResponseAsync(fabricName, providerName).toBlocking().single().body(); + } + + /** + * Refresh details from the recovery services provider. + * The operation to refresh the information from the recovery services provider. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider 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 beginRefreshProviderAsync(String fabricName, String providerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRefreshProviderWithServiceResponseAsync(fabricName, providerName), serviceCallback); + } + + /** + * Refresh details from the recovery services provider. + * The operation to refresh the information from the recovery services provider. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryServicesProviderInner object + */ + public Observable beginRefreshProviderAsync(String fabricName, String providerName) { + return beginRefreshProviderWithServiceResponseAsync(fabricName, providerName).map(new Func1, RecoveryServicesProviderInner>() { + @Override + public RecoveryServicesProviderInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Refresh details from the recovery services provider. + * The operation to refresh the information from the recovery services provider. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryServicesProviderInner object + */ + public Observable> beginRefreshProviderWithServiceResponseAsync(String fabricName, String providerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (providerName == null) { + throw new IllegalArgumentException("Parameter providerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginRefreshProvider(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, providerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRefreshProviderDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRefreshProviderDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty we assume that it is old client and continue the old behavior). + * The operation to removes/delete(unregister) a recovery services provider from the vault. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String fabricName, String providerName) { + deleteWithServiceResponseAsync(fabricName, providerName).toBlocking().last().body(); + } + + /** + * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty we assume that it is old client and continue the old behavior). + * The operation to removes/delete(unregister) a recovery services provider from the vault. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider 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 deleteAsync(String fabricName, String providerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(fabricName, providerName), serviceCallback); + } + + /** + * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty we assume that it is old client and continue the old behavior). + * The operation to removes/delete(unregister) a recovery services provider from the vault. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String fabricName, String providerName) { + return deleteWithServiceResponseAsync(fabricName, providerName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty we assume that it is old client and continue the old behavior). + * The operation to removes/delete(unregister) a recovery services provider from the vault. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String fabricName, String providerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (providerName == null) { + throw new IllegalArgumentException("Parameter providerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, providerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty we assume that it is old client and continue the old behavior). + * The operation to removes/delete(unregister) a recovery services provider from the vault. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String fabricName, String providerName) { + beginDeleteWithServiceResponseAsync(fabricName, providerName).toBlocking().single().body(); + } + + /** + * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty we assume that it is old client and continue the old behavior). + * The operation to removes/delete(unregister) a recovery services provider from the vault. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider 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 beginDeleteAsync(String fabricName, String providerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(fabricName, providerName), serviceCallback); + } + + /** + * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty we assume that it is old client and continue the old behavior). + * The operation to removes/delete(unregister) a recovery services provider from the vault. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String fabricName, String providerName) { + return beginDeleteWithServiceResponseAsync(fabricName, providerName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty we assume that it is old client and continue the old behavior). + * The operation to removes/delete(unregister) a recovery services provider from the vault. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String fabricName, String providerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (providerName == null) { + throw new IllegalArgumentException("Parameter providerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, providerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of a recovery services provider. + * Gets the details of registered recovery services provider. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider 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 RecoveryServicesProviderInner object if successful. + */ + public RecoveryServicesProviderInner get(String fabricName, String providerName) { + return getWithServiceResponseAsync(fabricName, providerName).toBlocking().single().body(); + } + + /** + * Gets the details of a recovery services provider. + * Gets the details of registered recovery services provider. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider 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 getAsync(String fabricName, String providerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(fabricName, providerName), serviceCallback); + } + + /** + * Gets the details of a recovery services provider. + * Gets the details of registered recovery services provider. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryServicesProviderInner object + */ + public Observable getAsync(String fabricName, String providerName) { + return getWithServiceResponseAsync(fabricName, providerName).map(new Func1, RecoveryServicesProviderInner>() { + @Override + public RecoveryServicesProviderInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the details of a recovery services provider. + * Gets the details of registered recovery services provider. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryServicesProviderInner object + */ + public Observable> getWithServiceResponseAsync(String fabricName, String providerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (providerName == null) { + throw new IllegalArgumentException("Parameter providerName is required 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(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, providerName, 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); + } + + /** + * Purges recovery service provider from fabric. + * The operation to purge(force delete) a recovery services provider from the vault. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void purge(String fabricName, String providerName) { + purgeWithServiceResponseAsync(fabricName, providerName).toBlocking().last().body(); + } + + /** + * Purges recovery service provider from fabric. + * The operation to purge(force delete) a recovery services provider from the vault. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider 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 purgeAsync(String fabricName, String providerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(purgeWithServiceResponseAsync(fabricName, providerName), serviceCallback); + } + + /** + * Purges recovery service provider from fabric. + * The operation to purge(force delete) a recovery services provider from the vault. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable purgeAsync(String fabricName, String providerName) { + return purgeWithServiceResponseAsync(fabricName, providerName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Purges recovery service provider from fabric. + * The operation to purge(force delete) a recovery services provider from the vault. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> purgeWithServiceResponseAsync(String fabricName, String providerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (providerName == null) { + throw new IllegalArgumentException("Parameter providerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.purge(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, providerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Purges recovery service provider from fabric. + * The operation to purge(force delete) a recovery services provider from the vault. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginPurge(String fabricName, String providerName) { + beginPurgeWithServiceResponseAsync(fabricName, providerName).toBlocking().single().body(); + } + + /** + * Purges recovery service provider from fabric. + * The operation to purge(force delete) a recovery services provider from the vault. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider 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 beginPurgeAsync(String fabricName, String providerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginPurgeWithServiceResponseAsync(fabricName, providerName), serviceCallback); + } + + /** + * Purges recovery service provider from fabric. + * The operation to purge(force delete) a recovery services provider from the vault. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginPurgeAsync(String fabricName, String providerName) { + return beginPurgeWithServiceResponseAsync(fabricName, providerName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Purges recovery service provider from fabric. + * The operation to purge(force delete) a recovery services provider from the vault. + * + * @param fabricName Fabric name. + * @param providerName Recovery services provider name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginPurgeWithServiceResponseAsync(String fabricName, String providerName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (providerName == null) { + throw new IllegalArgumentException("Parameter providerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginPurge(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, providerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginPurgeDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginPurgeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the list of registered recovery services providers for the fabric. + * Lists the registered recovery services providers for the specified fabric. + * + * @param fabricName Fabric 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<RecoveryServicesProviderInner> object if successful. + */ + public PagedList listByReplicationFabrics(final String fabricName) { + ServiceResponse> response = listByReplicationFabricsSinglePageAsync(fabricName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of registered recovery services providers for the fabric. + * Lists the registered recovery services providers for the specified fabric. + * + * @param fabricName Fabric 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> listByReplicationFabricsAsync(final String fabricName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationFabricsSinglePageAsync(fabricName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of registered recovery services providers for the fabric. + * Lists the registered recovery services providers for the specified fabric. + * + * @param fabricName Fabric name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecoveryServicesProviderInner> object + */ + public Observable> listByReplicationFabricsAsync(final String fabricName) { + return listByReplicationFabricsWithServiceResponseAsync(fabricName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of registered recovery services providers for the fabric. + * Lists the registered recovery services providers for the specified fabric. + * + * @param fabricName Fabric name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecoveryServicesProviderInner> object + */ + public Observable>> listByReplicationFabricsWithServiceResponseAsync(final String fabricName) { + return listByReplicationFabricsSinglePageAsync(fabricName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationFabricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of registered recovery services providers for the fabric. + * Lists the registered recovery services providers for the specified fabric. + * + ServiceResponse> * @param fabricName Fabric name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RecoveryServicesProviderInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationFabricsSinglePageAsync(final String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByReplicationFabrics(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationFabricsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationFabricsDelegate(Response response) 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 list of registered recovery services providers in the vault. This is a view only api. + * Lists the registered recovery services providers in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<RecoveryServicesProviderInner> 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 list of registered recovery services providers in the vault. This is a view only api. + * Lists the registered recovery services providers in the vault. + * + * @param serviceCallback 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 list of registered recovery services providers in the vault. This is a view only api. + * Lists the registered recovery services providers in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecoveryServicesProviderInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of registered recovery services providers in the vault. This is a view only api. + * Lists the registered recovery services providers in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecoveryServicesProviderInner> 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 list of registered recovery services providers in the vault. This is a view only api. + * Lists the registered recovery services providers in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RecoveryServicesProviderInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = 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 list of registered recovery services providers for the fabric. + * Lists the registered recovery services providers for the specified fabric. + * + * @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<RecoveryServicesProviderInner> object if successful. + */ + public PagedList listByReplicationFabricsNext(final String nextPageLink) { + ServiceResponse> response = listByReplicationFabricsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of registered recovery services providers for the fabric. + * Lists the registered recovery services providers for the specified fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByReplicationFabricsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationFabricsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of registered recovery services providers for the fabric. + * Lists the registered recovery services providers for the specified fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecoveryServicesProviderInner> object + */ + public Observable> listByReplicationFabricsNextAsync(final String nextPageLink) { + return listByReplicationFabricsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of registered recovery services providers for the fabric. + * Lists the registered recovery services providers for the specified fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecoveryServicesProviderInner> object + */ + public Observable>> listByReplicationFabricsNextWithServiceResponseAsync(final String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationFabricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of registered recovery services providers for the fabric. + * Lists the registered recovery services providers for the specified fabric. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RecoveryServicesProviderInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationFabricsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByReplicationFabricsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationFabricsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationFabricsNextDelegate(Response response) 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 list of registered recovery services providers in the vault. This is a view only api. + * Lists the registered recovery services providers in the vault. + * + * @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<RecoveryServicesProviderInner> 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 list of registered recovery services providers in the vault. This is a view only api. + * Lists the registered recovery services providers in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback 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 list of registered recovery services providers in the vault. This is a view only api. + * Lists the registered recovery services providers in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecoveryServicesProviderInner> 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 list of registered recovery services providers in the vault. This is a view only api. + * Lists the registered recovery services providers in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecoveryServicesProviderInner> 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 list of registered recovery services providers in the vault. This is a view only api. + * Lists the registered recovery services providers in the vault. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RecoveryServicesProviderInner> 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationStorageClassificationMappingsImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationStorageClassificationMappingsImpl.java new file mode 100644 index 0000000000000..fa0ef10fe3756 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationStorageClassificationMappingsImpl.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationStorageClassificationMappings; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.StorageClassificationMapping; + +class ReplicationStorageClassificationMappingsImpl extends WrapperImpl implements ReplicationStorageClassificationMappings { + private final RecoveryServicesManager manager; + + ReplicationStorageClassificationMappingsImpl(RecoveryServicesManager manager) { + super(manager.inner().replicationStorageClassificationMappings()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public StorageClassificationMappingImpl define(String name) { + return wrapModel(name); + } + + private StorageClassificationMappingImpl wrapModel(StorageClassificationMappingInner inner) { + return new StorageClassificationMappingImpl(inner, manager()); + } + + private StorageClassificationMappingImpl wrapModel(String name) { + return new StorageClassificationMappingImpl(name, this.manager()); + } + + @Override + public Observable listAsync() { + ReplicationStorageClassificationMappingsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public StorageClassificationMapping call(StorageClassificationMappingInner inner) { + return new StorageClassificationMappingImpl(inner, manager()); + } + }); + } + + @Override + public Observable listByReplicationStorageClassificationsAsync(final String fabricName, final String storageClassificationName) { + ReplicationStorageClassificationMappingsInner client = this.inner(); + return client.listByReplicationStorageClassificationsAsync(fabricName, storageClassificationName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public StorageClassificationMapping call(StorageClassificationMappingInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName) { + ReplicationStorageClassificationMappingsInner client = this.inner(); + return client.getAsync(fabricName, storageClassificationName, storageClassificationMappingName) + .map(new Func1() { + @Override + public StorageClassificationMapping call(StorageClassificationMappingInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName) { + ReplicationStorageClassificationMappingsInner client = this.inner(); + return client.deleteAsync(fabricName, storageClassificationName, storageClassificationMappingName).toCompletable(); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationStorageClassificationMappingsInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationStorageClassificationMappingsInner.java new file mode 100644 index 0000000000000..43fa564860812 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationStorageClassificationMappingsInner.java @@ -0,0 +1,1270 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.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.management.recoveryservicessiterecovery.v2018_01_10.StorageClassificationMappingInput; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.StorageMappingInputProperties; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ReplicationStorageClassificationMappings. + */ +public class ReplicationStorageClassificationMappingsInner { + /** The Retrofit service to perform REST calls. */ + private ReplicationStorageClassificationMappingsService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationStorageClassificationMappingsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReplicationStorageClassificationMappingsInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(ReplicationStorageClassificationMappingsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReplicationStorageClassificationMappings to be + * used by Retrofit to perform actually REST calls. + */ + interface ReplicationStorageClassificationMappingsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationStorageClassificationMappings get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("storageClassificationName") String storageClassificationName, @Path("storageClassificationMappingName") String storageClassificationMappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationStorageClassificationMappings create" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}") + Observable> create(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("storageClassificationName") String storageClassificationName, @Path("storageClassificationMappingName") String storageClassificationMappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body StorageClassificationMappingInput pairingInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationStorageClassificationMappings beginCreate" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}") + Observable> beginCreate(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("storageClassificationName") String storageClassificationName, @Path("storageClassificationMappingName") String storageClassificationMappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body StorageClassificationMappingInput pairingInput, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationStorageClassificationMappings delete" }) + @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("storageClassificationName") String storageClassificationName, @Path("storageClassificationMappingName") String storageClassificationMappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationStorageClassificationMappings beginDelete" }) + @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("storageClassificationName") String storageClassificationName, @Path("storageClassificationMappingName") String storageClassificationMappingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationStorageClassificationMappings listByReplicationStorageClassifications" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings") + Observable> listByReplicationStorageClassifications(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("storageClassificationName") String storageClassificationName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationStorageClassificationMappings list" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationStorageClassificationMappings") + Observable> list(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationStorageClassificationMappings listByReplicationStorageClassificationsNext" }) + @GET + Observable> listByReplicationStorageClassificationsNext(@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.recoveryservicessiterecovery.v2018_01_10.ReplicationStorageClassificationMappings listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the details of a storage classification mapping. + * Gets the details of the specified storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping 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 StorageClassificationMappingInner object if successful. + */ + public StorageClassificationMappingInner get(String fabricName, String storageClassificationName, String storageClassificationMappingName) { + return getWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName).toBlocking().single().body(); + } + + /** + * Gets the details of a storage classification mapping. + * Gets the details of the specified storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping 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 getAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName), serviceCallback); + } + + /** + * Gets the details of a storage classification mapping. + * Gets the details of the specified storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageClassificationMappingInner object + */ + public Observable getAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName) { + return getWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName).map(new Func1, StorageClassificationMappingInner>() { + @Override + public StorageClassificationMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the details of a storage classification mapping. + * Gets the details of the specified storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageClassificationMappingInner object + */ + public Observable> getWithServiceResponseAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (storageClassificationName == null) { + throw new IllegalArgumentException("Parameter storageClassificationName is required and cannot be null."); + } + if (storageClassificationMappingName == null) { + throw new IllegalArgumentException("Parameter storageClassificationMappingName is required 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(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, storageClassificationName, storageClassificationMappingName, 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); + } + + /** + * Create storage classification mapping. + * The operation to create a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping 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 StorageClassificationMappingInner object if successful. + */ + public StorageClassificationMappingInner create(String fabricName, String storageClassificationName, String storageClassificationMappingName) { + return createWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName).toBlocking().last().body(); + } + + /** + * Create storage classification mapping. + * The operation to create a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping 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 createAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName), serviceCallback); + } + + /** + * Create storage classification mapping. + * The operation to create a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName) { + return createWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName).map(new Func1, StorageClassificationMappingInner>() { + @Override + public StorageClassificationMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create storage classification mapping. + * The operation to create a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (storageClassificationName == null) { + throw new IllegalArgumentException("Parameter storageClassificationName is required and cannot be null."); + } + if (storageClassificationMappingName == null) { + throw new IllegalArgumentException("Parameter storageClassificationMappingName 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 StorageMappingInputProperties properties = null; + StorageClassificationMappingInput pairingInput = new StorageClassificationMappingInput(); + pairingInput.withProperties(null); + Observable> observable = service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, storageClassificationName, storageClassificationMappingName, this.client.apiVersion(), this.client.acceptLanguage(), pairingInput, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Create storage classification mapping. + * The operation to create a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @param properties Storage mapping input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StorageClassificationMappingInner object if successful. + */ + public StorageClassificationMappingInner create(String fabricName, String storageClassificationName, String storageClassificationMappingName, StorageMappingInputProperties properties) { + return createWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName, properties).toBlocking().last().body(); + } + + /** + * Create storage classification mapping. + * The operation to create a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @param properties Storage mapping input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName, StorageMappingInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName, properties), serviceCallback); + } + + /** + * Create storage classification mapping. + * The operation to create a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @param properties Storage mapping input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName, StorageMappingInputProperties properties) { + return createWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName, properties).map(new Func1, StorageClassificationMappingInner>() { + @Override + public StorageClassificationMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create storage classification mapping. + * The operation to create a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @param properties Storage mapping input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName, StorageMappingInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (storageClassificationName == null) { + throw new IllegalArgumentException("Parameter storageClassificationName is required and cannot be null."); + } + if (storageClassificationMappingName == null) { + throw new IllegalArgumentException("Parameter storageClassificationMappingName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + StorageClassificationMappingInput pairingInput = new StorageClassificationMappingInput(); + pairingInput.withProperties(properties); + Observable> observable = service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, storageClassificationName, storageClassificationMappingName, this.client.apiVersion(), this.client.acceptLanguage(), pairingInput, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create storage classification mapping. + * The operation to create a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping 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 StorageClassificationMappingInner object if successful. + */ + public StorageClassificationMappingInner beginCreate(String fabricName, String storageClassificationName, String storageClassificationMappingName) { + return beginCreateWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName).toBlocking().single().body(); + } + + /** + * Create storage classification mapping. + * The operation to create a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping 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 beginCreateAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName), serviceCallback); + } + + /** + * Create storage classification mapping. + * The operation to create a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageClassificationMappingInner object + */ + public Observable beginCreateAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName) { + return beginCreateWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName).map(new Func1, StorageClassificationMappingInner>() { + @Override + public StorageClassificationMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create storage classification mapping. + * The operation to create a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageClassificationMappingInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (storageClassificationName == null) { + throw new IllegalArgumentException("Parameter storageClassificationName is required and cannot be null."); + } + if (storageClassificationMappingName == null) { + throw new IllegalArgumentException("Parameter storageClassificationMappingName 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 StorageMappingInputProperties properties = null; + StorageClassificationMappingInput pairingInput = new StorageClassificationMappingInput(); + pairingInput.withProperties(null); + return service.beginCreate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, storageClassificationName, storageClassificationMappingName, this.client.apiVersion(), this.client.acceptLanguage(), pairingInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Create storage classification mapping. + * The operation to create a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @param properties Storage mapping input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StorageClassificationMappingInner object if successful. + */ + public StorageClassificationMappingInner beginCreate(String fabricName, String storageClassificationName, String storageClassificationMappingName, StorageMappingInputProperties properties) { + return beginCreateWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName, properties).toBlocking().single().body(); + } + + /** + * Create storage classification mapping. + * The operation to create a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @param properties Storage mapping input properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName, StorageMappingInputProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName, properties), serviceCallback); + } + + /** + * Create storage classification mapping. + * The operation to create a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @param properties Storage mapping input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageClassificationMappingInner object + */ + public Observable beginCreateAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName, StorageMappingInputProperties properties) { + return beginCreateWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName, properties).map(new Func1, StorageClassificationMappingInner>() { + @Override + public StorageClassificationMappingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create storage classification mapping. + * The operation to create a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @param properties Storage mapping input properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageClassificationMappingInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName, StorageMappingInputProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (storageClassificationName == null) { + throw new IllegalArgumentException("Parameter storageClassificationName is required and cannot be null."); + } + if (storageClassificationMappingName == null) { + throw new IllegalArgumentException("Parameter storageClassificationMappingName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + StorageClassificationMappingInput pairingInput = new StorageClassificationMappingInput(); + pairingInput.withProperties(properties); + return service.beginCreate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, storageClassificationName, storageClassificationMappingName, this.client.apiVersion(), this.client.acceptLanguage(), pairingInput, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a storage classification mapping. + * The operation to delete a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String fabricName, String storageClassificationName, String storageClassificationMappingName) { + deleteWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName).toBlocking().last().body(); + } + + /** + * Delete a storage classification mapping. + * The operation to delete a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping 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 deleteAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName), serviceCallback); + } + + /** + * Delete a storage classification mapping. + * The operation to delete a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName) { + return deleteWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a storage classification mapping. + * The operation to delete a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (storageClassificationName == null) { + throw new IllegalArgumentException("Parameter storageClassificationName is required and cannot be null."); + } + if (storageClassificationMappingName == null) { + throw new IllegalArgumentException("Parameter storageClassificationMappingName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, storageClassificationName, storageClassificationMappingName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete a storage classification mapping. + * The operation to delete a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String fabricName, String storageClassificationName, String storageClassificationMappingName) { + beginDeleteWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName).toBlocking().single().body(); + } + + /** + * Delete a storage classification mapping. + * The operation to delete a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping 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 beginDeleteAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName), serviceCallback); + } + + /** + * Delete a storage classification mapping. + * The operation to delete a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName) { + return beginDeleteWithServiceResponseAsync(fabricName, storageClassificationName, storageClassificationMappingName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a storage classification mapping. + * The operation to delete a storage classification mapping. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @param storageClassificationMappingName Storage classification mapping name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String fabricName, String storageClassificationName, String storageClassificationMappingName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (storageClassificationName == null) { + throw new IllegalArgumentException("Parameter storageClassificationName is required and cannot be null."); + } + if (storageClassificationMappingName == null) { + throw new IllegalArgumentException("Parameter storageClassificationMappingName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, storageClassificationName, storageClassificationMappingName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the list of storage classification mappings objects under a storage. + * Lists the storage classification mappings for the fabric. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classfication 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<StorageClassificationMappingInner> object if successful. + */ + public PagedList listByReplicationStorageClassifications(final String fabricName, final String storageClassificationName) { + ServiceResponse> response = listByReplicationStorageClassificationsSinglePageAsync(fabricName, storageClassificationName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationStorageClassificationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of storage classification mappings objects under a storage. + * Lists the storage classification mappings for the fabric. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classfication 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> listByReplicationStorageClassificationsAsync(final String fabricName, final String storageClassificationName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationStorageClassificationsSinglePageAsync(fabricName, storageClassificationName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationStorageClassificationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of storage classification mappings objects under a storage. + * Lists the storage classification mappings for the fabric. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classfication name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageClassificationMappingInner> object + */ + public Observable> listByReplicationStorageClassificationsAsync(final String fabricName, final String storageClassificationName) { + return listByReplicationStorageClassificationsWithServiceResponseAsync(fabricName, storageClassificationName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of storage classification mappings objects under a storage. + * Lists the storage classification mappings for the fabric. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classfication name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageClassificationMappingInner> object + */ + public Observable>> listByReplicationStorageClassificationsWithServiceResponseAsync(final String fabricName, final String storageClassificationName) { + return listByReplicationStorageClassificationsSinglePageAsync(fabricName, storageClassificationName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationStorageClassificationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of storage classification mappings objects under a storage. + * Lists the storage classification mappings for the fabric. + * + ServiceResponse> * @param fabricName Fabric name. + ServiceResponse> * @param storageClassificationName Storage classfication name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StorageClassificationMappingInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationStorageClassificationsSinglePageAsync(final String fabricName, final String storageClassificationName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (storageClassificationName == null) { + throw new IllegalArgumentException("Parameter storageClassificationName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByReplicationStorageClassifications(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, storageClassificationName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationStorageClassificationsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationStorageClassificationsDelegate(Response response) 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 list of storage classification mappings objects under a vault. + * Lists the storage classification mappings in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StorageClassificationMappingInner> 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 list of storage classification mappings objects under a vault. + * Lists the storage classification mappings in the vault. + * + * @param serviceCallback 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 list of storage classification mappings objects under a vault. + * Lists the storage classification mappings in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageClassificationMappingInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of storage classification mappings objects under a vault. + * Lists the storage classification mappings in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageClassificationMappingInner> 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 list of storage classification mappings objects under a vault. + * Lists the storage classification mappings in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StorageClassificationMappingInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = 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 list of storage classification mappings objects under a storage. + * Lists the storage classification mappings for the fabric. + * + * @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<StorageClassificationMappingInner> object if successful. + */ + public PagedList listByReplicationStorageClassificationsNext(final String nextPageLink) { + ServiceResponse> response = listByReplicationStorageClassificationsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationStorageClassificationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of storage classification mappings objects under a storage. + * Lists the storage classification mappings for the fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByReplicationStorageClassificationsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationStorageClassificationsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationStorageClassificationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of storage classification mappings objects under a storage. + * Lists the storage classification mappings for the fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageClassificationMappingInner> object + */ + public Observable> listByReplicationStorageClassificationsNextAsync(final String nextPageLink) { + return listByReplicationStorageClassificationsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of storage classification mappings objects under a storage. + * Lists the storage classification mappings for the fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageClassificationMappingInner> object + */ + public Observable>> listByReplicationStorageClassificationsNextWithServiceResponseAsync(final String nextPageLink) { + return listByReplicationStorageClassificationsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationStorageClassificationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of storage classification mappings objects under a storage. + * Lists the storage classification mappings for the fabric. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StorageClassificationMappingInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationStorageClassificationsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByReplicationStorageClassificationsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationStorageClassificationsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationStorageClassificationsNextDelegate(Response response) 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 list of storage classification mappings objects under a vault. + * Lists the storage classification mappings in the vault. + * + * @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<StorageClassificationMappingInner> 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 list of storage classification mappings objects under a vault. + * Lists the storage classification mappings in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback 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 list of storage classification mappings objects under a vault. + * Lists the storage classification mappings in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageClassificationMappingInner> 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 list of storage classification mappings objects under a vault. + * Lists the storage classification mappings in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageClassificationMappingInner> 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 list of storage classification mappings objects under a vault. + * Lists the storage classification mappings in the vault. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StorageClassificationMappingInner> 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationStorageClassificationsImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationStorageClassificationsImpl.java new file mode 100644 index 0000000000000..402839759533c --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationStorageClassificationsImpl.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationStorageClassifications; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.StorageClassification; + +class ReplicationStorageClassificationsImpl extends WrapperImpl implements ReplicationStorageClassifications { + private final RecoveryServicesManager manager; + + ReplicationStorageClassificationsImpl(RecoveryServicesManager manager) { + super(manager.inner().replicationStorageClassifications()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + private StorageClassificationImpl wrapModel(StorageClassificationInner inner) { + return new StorageClassificationImpl(inner, manager()); + } + + @Override + public Observable listAsync() { + ReplicationStorageClassificationsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public StorageClassification call(StorageClassificationInner inner) { + return new StorageClassificationImpl(inner, manager()); + } + }); + } + + @Override + public Observable listByReplicationFabricsAsync(final String fabricName) { + ReplicationStorageClassificationsInner client = this.inner(); + return client.listByReplicationFabricsAsync(fabricName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public StorageClassification call(StorageClassificationInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String fabricName, String storageClassificationName) { + ReplicationStorageClassificationsInner client = this.inner(); + return client.getAsync(fabricName, storageClassificationName) + .map(new Func1() { + @Override + public StorageClassification call(StorageClassificationInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationStorageClassificationsInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationStorageClassificationsInner.java new file mode 100644 index 0000000000000..8be1c964119b4 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationStorageClassificationsInner.java @@ -0,0 +1,654 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ReplicationStorageClassifications. + */ +public class ReplicationStorageClassificationsInner { + /** The Retrofit service to perform REST calls. */ + private ReplicationStorageClassificationsService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationStorageClassificationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReplicationStorageClassificationsInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(ReplicationStorageClassificationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReplicationStorageClassifications to be + * used by Retrofit to perform actually REST calls. + */ + interface ReplicationStorageClassificationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationStorageClassifications get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("storageClassificationName") String storageClassificationName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationStorageClassifications listByReplicationFabrics" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications") + Observable> listByReplicationFabrics(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationStorageClassifications list" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationStorageClassifications") + Observable> list(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationStorageClassifications listByReplicationFabricsNext" }) + @GET + Observable> listByReplicationFabricsNext(@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.recoveryservicessiterecovery.v2018_01_10.ReplicationStorageClassifications listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the details of a storage classification. + * Gets the details of the specified storage classification. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification 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 StorageClassificationInner object if successful. + */ + public StorageClassificationInner get(String fabricName, String storageClassificationName) { + return getWithServiceResponseAsync(fabricName, storageClassificationName).toBlocking().single().body(); + } + + /** + * Gets the details of a storage classification. + * Gets the details of the specified storage classification. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification 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 getAsync(String fabricName, String storageClassificationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(fabricName, storageClassificationName), serviceCallback); + } + + /** + * Gets the details of a storage classification. + * Gets the details of the specified storage classification. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageClassificationInner object + */ + public Observable getAsync(String fabricName, String storageClassificationName) { + return getWithServiceResponseAsync(fabricName, storageClassificationName).map(new Func1, StorageClassificationInner>() { + @Override + public StorageClassificationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the details of a storage classification. + * Gets the details of the specified storage classification. + * + * @param fabricName Fabric name. + * @param storageClassificationName Storage classification name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageClassificationInner object + */ + public Observable> getWithServiceResponseAsync(String fabricName, String storageClassificationName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (storageClassificationName == null) { + throw new IllegalArgumentException("Parameter storageClassificationName is required 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(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, storageClassificationName, 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); + } + + /** + * Gets the list of storage classification objects under a fabric. + * Lists the storage classifications available in the specified fabric. + * + * @param fabricName Site name of interest. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StorageClassificationInner> object if successful. + */ + public PagedList listByReplicationFabrics(final String fabricName) { + ServiceResponse> response = listByReplicationFabricsSinglePageAsync(fabricName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of storage classification objects under a fabric. + * Lists the storage classifications available in the specified fabric. + * + * @param fabricName Site name of interest. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByReplicationFabricsAsync(final String fabricName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationFabricsSinglePageAsync(fabricName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of storage classification objects under a fabric. + * Lists the storage classifications available in the specified fabric. + * + * @param fabricName Site name of interest. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageClassificationInner> object + */ + public Observable> listByReplicationFabricsAsync(final String fabricName) { + return listByReplicationFabricsWithServiceResponseAsync(fabricName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of storage classification objects under a fabric. + * Lists the storage classifications available in the specified fabric. + * + * @param fabricName Site name of interest. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageClassificationInner> object + */ + public Observable>> listByReplicationFabricsWithServiceResponseAsync(final String fabricName) { + return listByReplicationFabricsSinglePageAsync(fabricName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationFabricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of storage classification objects under a fabric. + * Lists the storage classifications available in the specified fabric. + * + ServiceResponse> * @param fabricName Site name of interest. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StorageClassificationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationFabricsSinglePageAsync(final String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByReplicationFabrics(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationFabricsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationFabricsDelegate(Response response) 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 list of storage classification objects under a vault. + * Lists the storage classifications in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StorageClassificationInner> 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 list of storage classification objects under a vault. + * Lists the storage classifications in the vault. + * + * @param serviceCallback 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 list of storage classification objects under a vault. + * Lists the storage classifications in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageClassificationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of storage classification objects under a vault. + * Lists the storage classifications in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageClassificationInner> 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 list of storage classification objects under a vault. + * Lists the storage classifications in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StorageClassificationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = 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 list of storage classification objects under a fabric. + * Lists the storage classifications available in the specified fabric. + * + * @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<StorageClassificationInner> object if successful. + */ + public PagedList listByReplicationFabricsNext(final String nextPageLink) { + ServiceResponse> response = listByReplicationFabricsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of storage classification objects under a fabric. + * Lists the storage classifications available in the specified fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByReplicationFabricsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationFabricsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of storage classification objects under a fabric. + * Lists the storage classifications available in the specified fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageClassificationInner> object + */ + public Observable> listByReplicationFabricsNextAsync(final String nextPageLink) { + return listByReplicationFabricsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of storage classification objects under a fabric. + * Lists the storage classifications available in the specified fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageClassificationInner> object + */ + public Observable>> listByReplicationFabricsNextWithServiceResponseAsync(final String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationFabricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of storage classification objects under a fabric. + * Lists the storage classifications available in the specified fabric. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StorageClassificationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationFabricsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByReplicationFabricsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationFabricsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationFabricsNextDelegate(Response response) 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 list of storage classification objects under a vault. + * Lists the storage classifications in the vault. + * + * @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<StorageClassificationInner> 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 list of storage classification objects under a vault. + * Lists the storage classifications in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback 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 list of storage classification objects under a vault. + * Lists the storage classifications in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageClassificationInner> 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 list of storage classification objects under a vault. + * Lists the storage classifications in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageClassificationInner> 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 list of storage classification objects under a vault. + * Lists the storage classifications in the vault. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StorageClassificationInner> 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationVaultHealthsImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationVaultHealthsImpl.java new file mode 100644 index 0000000000000..b90c57af5ee69 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationVaultHealthsImpl.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationVaultHealths; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.VaultHealthDetails; + +class ReplicationVaultHealthsImpl extends WrapperImpl implements ReplicationVaultHealths { + private final RecoveryServicesManager manager; + + ReplicationVaultHealthsImpl(RecoveryServicesManager manager) { + super(manager.inner().replicationVaultHealths()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public Observable getAsync() { + ReplicationVaultHealthsInner client = this.inner(); + return client.getAsync() + .map(new Func1() { + @Override + public VaultHealthDetails call(VaultHealthDetailsInner inner) { + return new VaultHealthDetailsImpl(inner, manager()); + } + }); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationVaultHealthsInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationVaultHealthsInner.java new file mode 100644 index 0000000000000..9b7b295b44290 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationVaultHealthsInner.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.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 ReplicationVaultHealths. + */ +public class ReplicationVaultHealthsInner { + /** The Retrofit service to perform REST calls. */ + private ReplicationVaultHealthsService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationVaultHealthsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReplicationVaultHealthsInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(ReplicationVaultHealthsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReplicationVaultHealths to be + * used by Retrofit to perform actually REST calls. + */ + interface ReplicationVaultHealthsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationVaultHealths get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultHealth") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the health summary for the vault. + * Gets the health details of the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VaultHealthDetailsInner object if successful. + */ + public VaultHealthDetailsInner get() { + return getWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Gets the health summary for the vault. + * Gets the health details of the vault. + * + * @param serviceCallback 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 health summary for the vault. + * Gets the health details of the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VaultHealthDetailsInner object + */ + public Observable getAsync() { + return getWithServiceResponseAsync().map(new Func1, VaultHealthDetailsInner>() { + @Override + public VaultHealthDetailsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the health summary for the vault. + * Gets the health details of the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VaultHealthDetailsInner object + */ + public Observable> getWithServiceResponseAsync() { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationvCentersImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationvCentersImpl.java new file mode 100644 index 0000000000000..4dad183865c1f --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationvCentersImpl.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationvCenters; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.VCenter; + +class ReplicationvCentersImpl extends WrapperImpl implements ReplicationvCenters { + private final RecoveryServicesManager manager; + + ReplicationvCentersImpl(RecoveryServicesManager manager) { + super(manager.inner().replicationvCenters()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public VCenterImpl define(String name) { + return wrapModel(name); + } + + private VCenterImpl wrapModel(VCenterInner inner) { + return new VCenterImpl(inner, manager()); + } + + private VCenterImpl wrapModel(String name) { + return new VCenterImpl(name, this.manager()); + } + + @Override + public Observable listAsync() { + ReplicationvCentersInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VCenter call(VCenterInner inner) { + return new VCenterImpl(inner, manager()); + } + }); + } + + @Override + public Observable listByReplicationFabricsAsync(final String fabricName) { + ReplicationvCentersInner client = this.inner(); + return client.listByReplicationFabricsAsync(fabricName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VCenter call(VCenterInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String fabricName, String vCenterName) { + ReplicationvCentersInner client = this.inner(); + return client.getAsync(fabricName, vCenterName) + .map(new Func1() { + @Override + public VCenter call(VCenterInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String fabricName, String vCenterName) { + ReplicationvCentersInner client = this.inner(); + return client.deleteAsync(fabricName, vCenterName).toCompletable(); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationvCentersInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationvCentersInner.java new file mode 100644 index 0000000000000..2d769f247a277 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/ReplicationvCentersInner.java @@ -0,0 +1,1588 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.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.management.recoveryservicessiterecovery.v2018_01_10.AddVCenterRequest; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.AddVCenterRequestProperties; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.UpdateVCenterRequest; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.UpdateVCenterRequestProperties; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ReplicationvCenters. + */ +public class ReplicationvCentersInner implements InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private ReplicationvCentersService service; + /** The service client containing this operation class. */ + private SiteRecoveryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationvCentersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReplicationvCentersInner(Retrofit retrofit, SiteRecoveryManagementClientImpl client) { + this.service = retrofit.create(ReplicationvCentersService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReplicationvCenters to be + * used by Retrofit to perform actually REST calls. + */ + interface ReplicationvCentersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationvCenters get" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}") + Observable> get(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("vCenterName") String vCenterName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationvCenters create" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}") + Observable> create(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("vCenterName") String vCenterName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AddVCenterRequest addVCenterRequest, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationvCenters beginCreate" }) + @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}") + Observable> beginCreate(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("vCenterName") String vCenterName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AddVCenterRequest addVCenterRequest, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationvCenters delete" }) + @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("vCenterName") String vCenterName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationvCenters beginDelete" }) + @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("vCenterName") String vCenterName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationvCenters update" }) + @PATCH("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}") + Observable> update(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("vCenterName") String vCenterName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UpdateVCenterRequest updateVCenterRequest, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationvCenters beginUpdate" }) + @PATCH("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}") + Observable> beginUpdate(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Path("vCenterName") String vCenterName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UpdateVCenterRequest updateVCenterRequest, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationvCenters listByReplicationFabrics" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters") + Observable> listByReplicationFabrics(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("fabricName") String fabricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationvCenters list" }) + @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationvCenters") + Observable> list(@Path("resourceName") String resourceName, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.ReplicationvCenters listByReplicationFabricsNext" }) + @GET + Observable> listByReplicationFabricsNext(@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.recoveryservicessiterecovery.v2018_01_10.ReplicationvCenters listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the details of a vCenter. + * Gets the details of a registered vCenter server(Add vCenter server.). + * + * @param fabricName Fabric name. + * @param vCenterName vCenter 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 VCenterInner object if successful. + */ + public VCenterInner get(String fabricName, String vCenterName) { + return getWithServiceResponseAsync(fabricName, vCenterName).toBlocking().single().body(); + } + + /** + * Gets the details of a vCenter. + * Gets the details of a registered vCenter server(Add vCenter server.). + * + * @param fabricName Fabric name. + * @param vCenterName vCenter 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 getAsync(String fabricName, String vCenterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(fabricName, vCenterName), serviceCallback); + } + + /** + * Gets the details of a vCenter. + * Gets the details of a registered vCenter server(Add vCenter server.). + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VCenterInner object + */ + public Observable getAsync(String fabricName, String vCenterName) { + return getWithServiceResponseAsync(fabricName, vCenterName).map(new Func1, VCenterInner>() { + @Override + public VCenterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the details of a vCenter. + * Gets the details of a registered vCenter server(Add vCenter server.). + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VCenterInner object + */ + public Observable> getWithServiceResponseAsync(String fabricName, String vCenterName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (vCenterName == null) { + throw new IllegalArgumentException("Parameter vCenterName is required 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(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, vCenterName, 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); + } + + /** + * Add vCenter. + * The operation to create a vCenter object.. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter 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 VCenterInner object if successful. + */ + public VCenterInner create(String fabricName, String vCenterName) { + return createWithServiceResponseAsync(fabricName, vCenterName).toBlocking().last().body(); + } + + /** + * Add vCenter. + * The operation to create a vCenter object.. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter 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 createAsync(String fabricName, String vCenterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(fabricName, vCenterName), serviceCallback); + } + + /** + * Add vCenter. + * The operation to create a vCenter object.. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String fabricName, String vCenterName) { + return createWithServiceResponseAsync(fabricName, vCenterName).map(new Func1, VCenterInner>() { + @Override + public VCenterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Add vCenter. + * The operation to create a vCenter object.. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String fabricName, String vCenterName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (vCenterName == null) { + throw new IllegalArgumentException("Parameter vCenterName 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 AddVCenterRequestProperties properties = null; + AddVCenterRequest addVCenterRequest = new AddVCenterRequest(); + addVCenterRequest.withProperties(null); + Observable> observable = service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, vCenterName, this.client.apiVersion(), this.client.acceptLanguage(), addVCenterRequest, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Add vCenter. + * The operation to create a vCenter object.. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @param properties The properties of an add vCenter request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VCenterInner object if successful. + */ + public VCenterInner create(String fabricName, String vCenterName, AddVCenterRequestProperties properties) { + return createWithServiceResponseAsync(fabricName, vCenterName, properties).toBlocking().last().body(); + } + + /** + * Add vCenter. + * The operation to create a vCenter object.. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @param properties The properties of an add vCenter request. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String fabricName, String vCenterName, AddVCenterRequestProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(fabricName, vCenterName, properties), serviceCallback); + } + + /** + * Add vCenter. + * The operation to create a vCenter object.. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @param properties The properties of an add vCenter request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String fabricName, String vCenterName, AddVCenterRequestProperties properties) { + return createWithServiceResponseAsync(fabricName, vCenterName, properties).map(new Func1, VCenterInner>() { + @Override + public VCenterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Add vCenter. + * The operation to create a vCenter object.. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @param properties The properties of an add vCenter request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String fabricName, String vCenterName, AddVCenterRequestProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (vCenterName == null) { + throw new IllegalArgumentException("Parameter vCenterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + AddVCenterRequest addVCenterRequest = new AddVCenterRequest(); + addVCenterRequest.withProperties(properties); + Observable> observable = service.create(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, vCenterName, this.client.apiVersion(), this.client.acceptLanguage(), addVCenterRequest, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Add vCenter. + * The operation to create a vCenter object.. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter 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 VCenterInner object if successful. + */ + public VCenterInner beginCreate(String fabricName, String vCenterName) { + return beginCreateWithServiceResponseAsync(fabricName, vCenterName).toBlocking().single().body(); + } + + /** + * Add vCenter. + * The operation to create a vCenter object.. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter 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 beginCreateAsync(String fabricName, String vCenterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(fabricName, vCenterName), serviceCallback); + } + + /** + * Add vCenter. + * The operation to create a vCenter object.. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VCenterInner object + */ + public Observable beginCreateAsync(String fabricName, String vCenterName) { + return beginCreateWithServiceResponseAsync(fabricName, vCenterName).map(new Func1, VCenterInner>() { + @Override + public VCenterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Add vCenter. + * The operation to create a vCenter object.. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VCenterInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String fabricName, String vCenterName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (vCenterName == null) { + throw new IllegalArgumentException("Parameter vCenterName 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 AddVCenterRequestProperties properties = null; + AddVCenterRequest addVCenterRequest = new AddVCenterRequest(); + addVCenterRequest.withProperties(null); + return service.beginCreate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, vCenterName, this.client.apiVersion(), this.client.acceptLanguage(), addVCenterRequest, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Add vCenter. + * The operation to create a vCenter object.. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @param properties The properties of an add vCenter request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VCenterInner object if successful. + */ + public VCenterInner beginCreate(String fabricName, String vCenterName, AddVCenterRequestProperties properties) { + return beginCreateWithServiceResponseAsync(fabricName, vCenterName, properties).toBlocking().single().body(); + } + + /** + * Add vCenter. + * The operation to create a vCenter object.. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @param properties The properties of an add vCenter request. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String fabricName, String vCenterName, AddVCenterRequestProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(fabricName, vCenterName, properties), serviceCallback); + } + + /** + * Add vCenter. + * The operation to create a vCenter object.. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @param properties The properties of an add vCenter request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VCenterInner object + */ + public Observable beginCreateAsync(String fabricName, String vCenterName, AddVCenterRequestProperties properties) { + return beginCreateWithServiceResponseAsync(fabricName, vCenterName, properties).map(new Func1, VCenterInner>() { + @Override + public VCenterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Add vCenter. + * The operation to create a vCenter object.. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @param properties The properties of an add vCenter request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VCenterInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String fabricName, String vCenterName, AddVCenterRequestProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (vCenterName == null) { + throw new IllegalArgumentException("Parameter vCenterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + AddVCenterRequest addVCenterRequest = new AddVCenterRequest(); + addVCenterRequest.withProperties(properties); + return service.beginCreate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, vCenterName, this.client.apiVersion(), this.client.acceptLanguage(), addVCenterRequest, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Remove vCenter operation. + * The operation to remove(unregister) a registered vCenter server from the vault. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String fabricName, String vCenterName) { + deleteWithServiceResponseAsync(fabricName, vCenterName).toBlocking().last().body(); + } + + /** + * Remove vCenter operation. + * The operation to remove(unregister) a registered vCenter server from the vault. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter 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 deleteAsync(String fabricName, String vCenterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(fabricName, vCenterName), serviceCallback); + } + + /** + * Remove vCenter operation. + * The operation to remove(unregister) a registered vCenter server from the vault. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String fabricName, String vCenterName) { + return deleteWithServiceResponseAsync(fabricName, vCenterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Remove vCenter operation. + * The operation to remove(unregister) a registered vCenter server from the vault. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String fabricName, String vCenterName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (vCenterName == null) { + throw new IllegalArgumentException("Parameter vCenterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, vCenterName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Remove vCenter operation. + * The operation to remove(unregister) a registered vCenter server from the vault. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String fabricName, String vCenterName) { + beginDeleteWithServiceResponseAsync(fabricName, vCenterName).toBlocking().single().body(); + } + + /** + * Remove vCenter operation. + * The operation to remove(unregister) a registered vCenter server from the vault. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter 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 beginDeleteAsync(String fabricName, String vCenterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(fabricName, vCenterName), serviceCallback); + } + + /** + * Remove vCenter operation. + * The operation to remove(unregister) a registered vCenter server from the vault. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String fabricName, String vCenterName) { + return beginDeleteWithServiceResponseAsync(fabricName, vCenterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Remove vCenter operation. + * The operation to remove(unregister) a registered vCenter server from the vault. + * + * @param fabricName Fabric name. + * @param vCenterName vCenter name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String fabricName, String vCenterName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (vCenterName == null) { + throw new IllegalArgumentException("Parameter vCenterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, vCenterName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Update vCenter operation. + * The operation to update a registered vCenter. + * + * @param fabricName Fabric name. + * @param vCenterName vCeneter 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 VCenterInner object if successful. + */ + public VCenterInner update(String fabricName, String vCenterName) { + return updateWithServiceResponseAsync(fabricName, vCenterName).toBlocking().last().body(); + } + + /** + * Update vCenter operation. + * The operation to update a registered vCenter. + * + * @param fabricName Fabric name. + * @param vCenterName vCeneter name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String fabricName, String vCenterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(fabricName, vCenterName), serviceCallback); + } + + /** + * Update vCenter operation. + * The operation to update a registered vCenter. + * + * @param fabricName Fabric name. + * @param vCenterName vCeneter name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String fabricName, String vCenterName) { + return updateWithServiceResponseAsync(fabricName, vCenterName).map(new Func1, VCenterInner>() { + @Override + public VCenterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update vCenter operation. + * The operation to update a registered vCenter. + * + * @param fabricName Fabric name. + * @param vCenterName vCeneter name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String fabricName, String vCenterName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (vCenterName == null) { + throw new IllegalArgumentException("Parameter vCenterName 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 UpdateVCenterRequestProperties properties = null; + UpdateVCenterRequest updateVCenterRequest = new UpdateVCenterRequest(); + updateVCenterRequest.withProperties(null); + Observable> observable = service.update(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, vCenterName, this.client.apiVersion(), this.client.acceptLanguage(), updateVCenterRequest, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Update vCenter operation. + * The operation to update a registered vCenter. + * + * @param fabricName Fabric name. + * @param vCenterName vCeneter name + * @param properties The update VCenter Request Properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VCenterInner object if successful. + */ + public VCenterInner update(String fabricName, String vCenterName, UpdateVCenterRequestProperties properties) { + return updateWithServiceResponseAsync(fabricName, vCenterName, properties).toBlocking().last().body(); + } + + /** + * Update vCenter operation. + * The operation to update a registered vCenter. + * + * @param fabricName Fabric name. + * @param vCenterName vCeneter name + * @param properties The update VCenter Request Properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String fabricName, String vCenterName, UpdateVCenterRequestProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(fabricName, vCenterName, properties), serviceCallback); + } + + /** + * Update vCenter operation. + * The operation to update a registered vCenter. + * + * @param fabricName Fabric name. + * @param vCenterName vCeneter name + * @param properties The update VCenter Request Properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String fabricName, String vCenterName, UpdateVCenterRequestProperties properties) { + return updateWithServiceResponseAsync(fabricName, vCenterName, properties).map(new Func1, VCenterInner>() { + @Override + public VCenterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update vCenter operation. + * The operation to update a registered vCenter. + * + * @param fabricName Fabric name. + * @param vCenterName vCeneter name + * @param properties The update VCenter Request Properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String fabricName, String vCenterName, UpdateVCenterRequestProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (vCenterName == null) { + throw new IllegalArgumentException("Parameter vCenterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + UpdateVCenterRequest updateVCenterRequest = new UpdateVCenterRequest(); + updateVCenterRequest.withProperties(properties); + Observable> observable = service.update(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, vCenterName, this.client.apiVersion(), this.client.acceptLanguage(), updateVCenterRequest, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Update vCenter operation. + * The operation to update a registered vCenter. + * + * @param fabricName Fabric name. + * @param vCenterName vCeneter 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 VCenterInner object if successful. + */ + public VCenterInner beginUpdate(String fabricName, String vCenterName) { + return beginUpdateWithServiceResponseAsync(fabricName, vCenterName).toBlocking().single().body(); + } + + /** + * Update vCenter operation. + * The operation to update a registered vCenter. + * + * @param fabricName Fabric name. + * @param vCenterName vCeneter 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 beginUpdateAsync(String fabricName, String vCenterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(fabricName, vCenterName), serviceCallback); + } + + /** + * Update vCenter operation. + * The operation to update a registered vCenter. + * + * @param fabricName Fabric name. + * @param vCenterName vCeneter name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VCenterInner object + */ + public Observable beginUpdateAsync(String fabricName, String vCenterName) { + return beginUpdateWithServiceResponseAsync(fabricName, vCenterName).map(new Func1, VCenterInner>() { + @Override + public VCenterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update vCenter operation. + * The operation to update a registered vCenter. + * + * @param fabricName Fabric name. + * @param vCenterName vCeneter name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VCenterInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String fabricName, String vCenterName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (vCenterName == null) { + throw new IllegalArgumentException("Parameter vCenterName 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 UpdateVCenterRequestProperties properties = null; + UpdateVCenterRequest updateVCenterRequest = new UpdateVCenterRequest(); + updateVCenterRequest.withProperties(null); + return service.beginUpdate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, vCenterName, this.client.apiVersion(), this.client.acceptLanguage(), updateVCenterRequest, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Update vCenter operation. + * The operation to update a registered vCenter. + * + * @param fabricName Fabric name. + * @param vCenterName vCeneter name + * @param properties The update VCenter Request Properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VCenterInner object if successful. + */ + public VCenterInner beginUpdate(String fabricName, String vCenterName, UpdateVCenterRequestProperties properties) { + return beginUpdateWithServiceResponseAsync(fabricName, vCenterName, properties).toBlocking().single().body(); + } + + /** + * Update vCenter operation. + * The operation to update a registered vCenter. + * + * @param fabricName Fabric name. + * @param vCenterName vCeneter name + * @param properties The update VCenter Request Properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAsync(String fabricName, String vCenterName, UpdateVCenterRequestProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(fabricName, vCenterName, properties), serviceCallback); + } + + /** + * Update vCenter operation. + * The operation to update a registered vCenter. + * + * @param fabricName Fabric name. + * @param vCenterName vCeneter name + * @param properties The update VCenter Request Properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VCenterInner object + */ + public Observable beginUpdateAsync(String fabricName, String vCenterName, UpdateVCenterRequestProperties properties) { + return beginUpdateWithServiceResponseAsync(fabricName, vCenterName, properties).map(new Func1, VCenterInner>() { + @Override + public VCenterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update vCenter operation. + * The operation to update a registered vCenter. + * + * @param fabricName Fabric name. + * @param vCenterName vCeneter name + * @param properties The update VCenter Request Properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VCenterInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String fabricName, String vCenterName, UpdateVCenterRequestProperties properties) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (vCenterName == null) { + throw new IllegalArgumentException("Parameter vCenterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(properties); + UpdateVCenterRequest updateVCenterRequest = new UpdateVCenterRequest(); + updateVCenterRequest.withProperties(properties); + return service.beginUpdate(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, vCenterName, this.client.apiVersion(), this.client.acceptLanguage(), updateVCenterRequest, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the list of vCenter registered under a fabric. + * Lists the vCenter servers registered in a fabric. + * + * @param fabricName Fabric 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<VCenterInner> object if successful. + */ + public PagedList listByReplicationFabrics(final String fabricName) { + ServiceResponse> response = listByReplicationFabricsSinglePageAsync(fabricName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of vCenter registered under a fabric. + * Lists the vCenter servers registered in a fabric. + * + * @param fabricName Fabric 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> listByReplicationFabricsAsync(final String fabricName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationFabricsSinglePageAsync(fabricName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of vCenter registered under a fabric. + * Lists the vCenter servers registered in a fabric. + * + * @param fabricName Fabric name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VCenterInner> object + */ + public Observable> listByReplicationFabricsAsync(final String fabricName) { + return listByReplicationFabricsWithServiceResponseAsync(fabricName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of vCenter registered under a fabric. + * Lists the vCenter servers registered in a fabric. + * + * @param fabricName Fabric name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VCenterInner> object + */ + public Observable>> listByReplicationFabricsWithServiceResponseAsync(final String fabricName) { + return listByReplicationFabricsSinglePageAsync(fabricName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationFabricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of vCenter registered under a fabric. + * Lists the vCenter servers registered in a fabric. + * + ServiceResponse> * @param fabricName Fabric name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VCenterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationFabricsSinglePageAsync(final String fabricName) { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (fabricName == null) { + throw new IllegalArgumentException("Parameter fabricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByReplicationFabrics(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), fabricName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationFabricsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationFabricsDelegate(Response response) 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 list of vCenter registered under the vault. + * Lists the vCenter servers registered in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<VCenterInner> 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 list of vCenter registered under the vault. + * Lists the vCenter servers registered in the vault. + * + * @param serviceCallback 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 list of vCenter registered under the vault. + * Lists the vCenter servers registered in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VCenterInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of vCenter registered under the vault. + * Lists the vCenter servers registered in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VCenterInner> 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 list of vCenter registered under the vault. + * Lists the vCenter servers registered in the vault. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VCenterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.resourceName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceName() is required and cannot be null."); + } + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.resourceName(), this.client.resourceGroupName(), this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = 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 list of vCenter registered under a fabric. + * Lists the vCenter servers registered in a fabric. + * + * @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<VCenterInner> object if successful. + */ + public PagedList listByReplicationFabricsNext(final String nextPageLink) { + ServiceResponse> response = listByReplicationFabricsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of vCenter registered under a fabric. + * Lists the vCenter servers registered in a fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByReplicationFabricsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByReplicationFabricsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of vCenter registered under a fabric. + * Lists the vCenter servers registered in a fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VCenterInner> object + */ + public Observable> listByReplicationFabricsNextAsync(final String nextPageLink) { + return listByReplicationFabricsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of vCenter registered under a fabric. + * Lists the vCenter servers registered in a fabric. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VCenterInner> object + */ + public Observable>> listByReplicationFabricsNextWithServiceResponseAsync(final String nextPageLink) { + return listByReplicationFabricsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByReplicationFabricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of vCenter registered under a fabric. + * Lists the vCenter servers registered in a fabric. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VCenterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByReplicationFabricsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByReplicationFabricsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByReplicationFabricsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByReplicationFabricsNextDelegate(Response response) 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 list of vCenter registered under the vault. + * Lists the vCenter servers registered in the vault. + * + * @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<VCenterInner> 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 list of vCenter registered under the vault. + * Lists the vCenter servers registered in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback 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 list of vCenter registered under the vault. + * Lists the vCenter servers registered in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VCenterInner> 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 list of vCenter registered under the vault. + * Lists the vCenter servers registered in the vault. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VCenterInner> 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 list of vCenter registered under the vault. + * Lists the vCenter servers registered in the vault. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VCenterInner> 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/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/SiteRecoveryManagementClientImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/SiteRecoveryManagementClientImpl.java new file mode 100644 index 0000000000000..04b00180300e3 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/SiteRecoveryManagementClientImpl.java @@ -0,0 +1,508 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.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 SiteRecoveryManagementClientImpl class. + */ +public class SiteRecoveryManagementClientImpl 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 subscription Id. */ + private String subscriptionId; + + /** + * Gets The subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets The subscription Id. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public SiteRecoveryManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** The name of the resource group where the recovery services vault is present. */ + private String resourceGroupName; + + /** + * Gets The name of the resource group where the recovery services vault is present. + * + * @return the resourceGroupName value. + */ + public String resourceGroupName() { + return this.resourceGroupName; + } + + /** + * Sets The name of the resource group where the recovery services vault is present. + * + * @param resourceGroupName the resourceGroupName value. + * @return the service client itself + */ + public SiteRecoveryManagementClientImpl withResourceGroupName(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + /** The name of the recovery services vault. */ + private String resourceName; + + /** + * Gets The name of the recovery services vault. + * + * @return the resourceName value. + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Sets The name of the recovery services vault. + * + * @param resourceName the resourceName value. + * @return the service client itself + */ + public SiteRecoveryManagementClientImpl withResourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + /** Client Api Version. */ + private String apiVersion; + + /** + * Gets Client Api Version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** Gets or sets the preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets Gets or sets the preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets Gets or sets the preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public SiteRecoveryManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + public SiteRecoveryManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + public SiteRecoveryManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The ReplicationVaultHealthsInner object to access its operations. + */ + private ReplicationVaultHealthsInner replicationVaultHealths; + + /** + * Gets the ReplicationVaultHealthsInner object to access its operations. + * @return the ReplicationVaultHealthsInner object. + */ + public ReplicationVaultHealthsInner replicationVaultHealths() { + return this.replicationVaultHealths; + } + + /** + * The ReplicationProtectedItemsInner object to access its operations. + */ + private ReplicationProtectedItemsInner replicationProtectedItems; + + /** + * Gets the ReplicationProtectedItemsInner object to access its operations. + * @return the ReplicationProtectedItemsInner object. + */ + public ReplicationProtectedItemsInner replicationProtectedItems() { + return this.replicationProtectedItems; + } + + /** + * The ReplicationNetworkMappingsInner object to access its operations. + */ + private ReplicationNetworkMappingsInner replicationNetworkMappings; + + /** + * Gets the ReplicationNetworkMappingsInner object to access its operations. + * @return the ReplicationNetworkMappingsInner object. + */ + public ReplicationNetworkMappingsInner replicationNetworkMappings() { + return this.replicationNetworkMappings; + } + + /** + * The ReplicationFabricsInner object to access its operations. + */ + private ReplicationFabricsInner replicationFabrics; + + /** + * Gets the ReplicationFabricsInner object to access its operations. + * @return the ReplicationFabricsInner object. + */ + public ReplicationFabricsInner replicationFabrics() { + return this.replicationFabrics; + } + + /** + * The ReplicationvCentersInner object to access its operations. + */ + private ReplicationvCentersInner replicationvCenters; + + /** + * Gets the ReplicationvCentersInner object to access its operations. + * @return the ReplicationvCentersInner object. + */ + public ReplicationvCentersInner replicationvCenters() { + return this.replicationvCenters; + } + + /** + * The ReplicationStorageClassificationMappingsInner object to access its operations. + */ + private ReplicationStorageClassificationMappingsInner replicationStorageClassificationMappings; + + /** + * Gets the ReplicationStorageClassificationMappingsInner object to access its operations. + * @return the ReplicationStorageClassificationMappingsInner object. + */ + public ReplicationStorageClassificationMappingsInner replicationStorageClassificationMappings() { + return this.replicationStorageClassificationMappings; + } + + /** + * The ReplicationStorageClassificationsInner object to access its operations. + */ + private ReplicationStorageClassificationsInner replicationStorageClassifications; + + /** + * Gets the ReplicationStorageClassificationsInner object to access its operations. + * @return the ReplicationStorageClassificationsInner object. + */ + public ReplicationStorageClassificationsInner replicationStorageClassifications() { + return this.replicationStorageClassifications; + } + + /** + * The ReplicationRecoveryServicesProvidersInner object to access its operations. + */ + private ReplicationRecoveryServicesProvidersInner replicationRecoveryServicesProviders; + + /** + * Gets the ReplicationRecoveryServicesProvidersInner object to access its operations. + * @return the ReplicationRecoveryServicesProvidersInner object. + */ + public ReplicationRecoveryServicesProvidersInner replicationRecoveryServicesProviders() { + return this.replicationRecoveryServicesProviders; + } + + /** + * The RecoveryPointsInner object to access its operations. + */ + private RecoveryPointsInner recoveryPoints; + + /** + * Gets the RecoveryPointsInner object to access its operations. + * @return the RecoveryPointsInner object. + */ + public RecoveryPointsInner recoveryPoints() { + return this.recoveryPoints; + } + + /** + * The ReplicationRecoveryPlansInner object to access its operations. + */ + private ReplicationRecoveryPlansInner replicationRecoveryPlans; + + /** + * Gets the ReplicationRecoveryPlansInner object to access its operations. + * @return the ReplicationRecoveryPlansInner object. + */ + public ReplicationRecoveryPlansInner replicationRecoveryPlans() { + return this.replicationRecoveryPlans; + } + + /** + * The ReplicationProtectionContainersInner object to access its operations. + */ + private ReplicationProtectionContainersInner replicationProtectionContainers; + + /** + * Gets the ReplicationProtectionContainersInner object to access its operations. + * @return the ReplicationProtectionContainersInner object. + */ + public ReplicationProtectionContainersInner replicationProtectionContainers() { + return this.replicationProtectionContainers; + } + + /** + * The ReplicationProtectionContainerMappingsInner object to access its operations. + */ + private ReplicationProtectionContainerMappingsInner replicationProtectionContainerMappings; + + /** + * Gets the ReplicationProtectionContainerMappingsInner object to access its operations. + * @return the ReplicationProtectionContainerMappingsInner object. + */ + public ReplicationProtectionContainerMappingsInner replicationProtectionContainerMappings() { + return this.replicationProtectionContainerMappings; + } + + /** + * The ReplicationProtectableItemsInner object to access its operations. + */ + private ReplicationProtectableItemsInner replicationProtectableItems; + + /** + * Gets the ReplicationProtectableItemsInner object to access its operations. + * @return the ReplicationProtectableItemsInner object. + */ + public ReplicationProtectableItemsInner replicationProtectableItems() { + return this.replicationProtectableItems; + } + + /** + * The ReplicationPoliciesInner object to access its operations. + */ + private ReplicationPoliciesInner replicationPolicies; + + /** + * Gets the ReplicationPoliciesInner object to access its operations. + * @return the ReplicationPoliciesInner object. + */ + public ReplicationPoliciesInner replicationPolicies() { + return this.replicationPolicies; + } + + /** + * 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 ReplicationNetworksInner object to access its operations. + */ + private ReplicationNetworksInner replicationNetworks; + + /** + * Gets the ReplicationNetworksInner object to access its operations. + * @return the ReplicationNetworksInner object. + */ + public ReplicationNetworksInner replicationNetworks() { + return this.replicationNetworks; + } + + /** + * The ReplicationLogicalNetworksInner object to access its operations. + */ + private ReplicationLogicalNetworksInner replicationLogicalNetworks; + + /** + * Gets the ReplicationLogicalNetworksInner object to access its operations. + * @return the ReplicationLogicalNetworksInner object. + */ + public ReplicationLogicalNetworksInner replicationLogicalNetworks() { + return this.replicationLogicalNetworks; + } + + /** + * The ReplicationJobsInner object to access its operations. + */ + private ReplicationJobsInner replicationJobs; + + /** + * Gets the ReplicationJobsInner object to access its operations. + * @return the ReplicationJobsInner object. + */ + public ReplicationJobsInner replicationJobs() { + return this.replicationJobs; + } + + /** + * The ReplicationEventsInner object to access its operations. + */ + private ReplicationEventsInner replicationEvents; + + /** + * Gets the ReplicationEventsInner object to access its operations. + * @return the ReplicationEventsInner object. + */ + public ReplicationEventsInner replicationEvents() { + return this.replicationEvents; + } + + /** + * The ReplicationAlertSettingsInner object to access its operations. + */ + private ReplicationAlertSettingsInner replicationAlertSettings; + + /** + * Gets the ReplicationAlertSettingsInner object to access its operations. + * @return the ReplicationAlertSettingsInner object. + */ + public ReplicationAlertSettingsInner replicationAlertSettings() { + return this.replicationAlertSettings; + } + + /** + * Initializes an instance of SiteRecoveryManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public SiteRecoveryManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of SiteRecoveryManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public SiteRecoveryManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of SiteRecoveryManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public SiteRecoveryManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2016-08-10"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.replicationVaultHealths = new ReplicationVaultHealthsInner(restClient().retrofit(), this); + this.replicationProtectedItems = new ReplicationProtectedItemsInner(restClient().retrofit(), this); + this.replicationNetworkMappings = new ReplicationNetworkMappingsInner(restClient().retrofit(), this); + this.replicationFabrics = new ReplicationFabricsInner(restClient().retrofit(), this); + this.replicationvCenters = new ReplicationvCentersInner(restClient().retrofit(), this); + this.replicationStorageClassificationMappings = new ReplicationStorageClassificationMappingsInner(restClient().retrofit(), this); + this.replicationStorageClassifications = new ReplicationStorageClassificationsInner(restClient().retrofit(), this); + this.replicationRecoveryServicesProviders = new ReplicationRecoveryServicesProvidersInner(restClient().retrofit(), this); + this.recoveryPoints = new RecoveryPointsInner(restClient().retrofit(), this); + this.replicationRecoveryPlans = new ReplicationRecoveryPlansInner(restClient().retrofit(), this); + this.replicationProtectionContainers = new ReplicationProtectionContainersInner(restClient().retrofit(), this); + this.replicationProtectionContainerMappings = new ReplicationProtectionContainerMappingsInner(restClient().retrofit(), this); + this.replicationProtectableItems = new ReplicationProtectableItemsInner(restClient().retrofit(), this); + this.replicationPolicies = new ReplicationPoliciesInner(restClient().retrofit(), this); + this.operations = new OperationsInner(restClient().retrofit(), this); + this.replicationNetworks = new ReplicationNetworksInner(restClient().retrofit(), this); + this.replicationLogicalNetworks = new ReplicationLogicalNetworksInner(restClient().retrofit(), this); + this.replicationJobs = new ReplicationJobsInner(restClient().retrofit(), this); + this.replicationEvents = new ReplicationEventsInner(restClient().retrofit(), this); + this.replicationAlertSettings = new ReplicationAlertSettingsInner(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)", super.userAgent(), "SiteRecoveryManagementClient", "2016-08-10"); + } +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/StorageClassificationImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/StorageClassificationImpl.java new file mode 100644 index 0000000000000..855dfeb1f1f1e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/StorageClassificationImpl.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.StorageClassification; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.StorageClassificationProperties; + +class StorageClassificationImpl extends IndexableRefreshableWrapperImpl implements StorageClassification { + private final RecoveryServicesManager manager; + private String fabricName; + private String storageClassificationName; + + StorageClassificationImpl(StorageClassificationInner inner, RecoveryServicesManager manager) { + super(null, inner); + this.manager = manager; + this.fabricName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationFabrics"); + this.storageClassificationName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationStorageClassifications"); + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + ReplicationStorageClassificationsInner client = this.manager().inner().replicationStorageClassifications(); + return client.getAsync(this.fabricName, this.storageClassificationName); + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public StorageClassificationProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/StorageClassificationInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/StorageClassificationInner.java new file mode 100644 index 0000000000000..03003a0695def --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/StorageClassificationInner.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.StorageClassificationProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Storage object definition. + */ +public class StorageClassificationInner extends ProxyResource { + /** + * Proprties of the storage object. + */ + @JsonProperty(value = "properties") + private StorageClassificationProperties properties; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get proprties of the storage object. + * + * @return the properties value + */ + public StorageClassificationProperties properties() { + return this.properties; + } + + /** + * Set proprties of the storage object. + * + * @param properties the properties value to set + * @return the StorageClassificationInner object itself. + */ + public StorageClassificationInner withProperties(StorageClassificationProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the StorageClassificationInner object itself. + */ + public StorageClassificationInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/StorageClassificationMappingImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/StorageClassificationMappingImpl.java new file mode 100644 index 0000000000000..3fcda48b19a76 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/StorageClassificationMappingImpl.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.StorageClassificationMapping; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.StorageClassificationMappingProperties; + +class StorageClassificationMappingImpl extends CreatableUpdatableImpl implements StorageClassificationMapping, StorageClassificationMapping.Definition, StorageClassificationMapping.Update { + private final RecoveryServicesManager manager; + private String fabricName; + private String storageClassificationName; + private String storageClassificationMappingName; + + StorageClassificationMappingImpl(String name, RecoveryServicesManager manager) { + super(name, new StorageClassificationMappingInner()); + this.manager = manager; + // Set resource name + this.storageClassificationMappingName = name; + // + } + + StorageClassificationMappingImpl(StorageClassificationMappingInner inner, RecoveryServicesManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.storageClassificationMappingName = inner.name(); + // resource ancestor names + this.fabricName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationFabrics"); + this.storageClassificationName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationStorageClassifications"); + this.storageClassificationMappingName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationStorageClassificationMappings"); + // + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ReplicationStorageClassificationMappingsInner client = this.manager().inner().replicationStorageClassificationMappings(); + return client.createAsync(this.fabricName, this.storageClassificationName, this.storageClassificationMappingName) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ReplicationStorageClassificationMappingsInner client = this.manager().inner().replicationStorageClassificationMappings(); + return client.createAsync(this.fabricName, this.storageClassificationName, this.storageClassificationMappingName) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ReplicationStorageClassificationMappingsInner client = this.manager().inner().replicationStorageClassificationMappings(); + return client.getAsync(this.fabricName, this.storageClassificationName, this.storageClassificationMappingName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public StorageClassificationMappingProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public StorageClassificationMappingImpl withExistingReplicationStorageClassification(String fabricName, String storageClassificationName) { + this.fabricName = fabricName; + this.storageClassificationName = storageClassificationName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/StorageClassificationMappingInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/StorageClassificationMappingInner.java new file mode 100644 index 0000000000000..fd35fa99b86d3 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/StorageClassificationMappingInner.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.StorageClassificationMappingProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Storage mapping object. + */ +public class StorageClassificationMappingInner extends ProxyResource { + /** + * Proprties of the storage mappping object. + */ + @JsonProperty(value = "properties") + private StorageClassificationMappingProperties properties; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get proprties of the storage mappping object. + * + * @return the properties value + */ + public StorageClassificationMappingProperties properties() { + return this.properties; + } + + /** + * Set proprties of the storage mappping object. + * + * @param properties the properties value to set + * @return the StorageClassificationMappingInner object itself. + */ + public StorageClassificationMappingInner withProperties(StorageClassificationMappingProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the StorageClassificationMappingInner object itself. + */ + public StorageClassificationMappingInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/VCenterImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/VCenterImpl.java new file mode 100644 index 0000000000000..83a3a6f488a1f --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/VCenterImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.VCenter; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.VCenterProperties; + +class VCenterImpl extends CreatableUpdatableImpl implements VCenter, VCenter.Definition, VCenter.Update { + private final RecoveryServicesManager manager; + private String fabricName; + private String vCenterName; + + VCenterImpl(String name, RecoveryServicesManager manager) { + super(name, new VCenterInner()); + this.manager = manager; + // Set resource name + this.vCenterName = name; + // + } + + VCenterImpl(VCenterInner inner, RecoveryServicesManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.vCenterName = inner.name(); + // resource ancestor names + this.fabricName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationFabrics"); + this.vCenterName = IdParsingUtils.getValueFromIdByName(inner.id(), "replicationvCenters"); + // + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ReplicationvCentersInner client = this.manager().inner().replicationvCenters(); + return client.createAsync(this.fabricName, this.vCenterName) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ReplicationvCentersInner client = this.manager().inner().replicationvCenters(); + return client.updateAsync(this.fabricName, this.vCenterName) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ReplicationvCentersInner client = this.manager().inner().replicationvCenters(); + return client.getAsync(this.fabricName, this.vCenterName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public VCenterProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public VCenterImpl withExistingReplicationFabric(String fabricName) { + this.fabricName = fabricName; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/VCenterInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/VCenterInner.java new file mode 100644 index 0000000000000..c6dac74034922 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/VCenterInner.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.VCenterProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * vCenter definition. + */ +public class VCenterInner extends ProxyResource { + /** + * VCenter related data. + */ + @JsonProperty(value = "properties") + private VCenterProperties properties; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get vCenter related data. + * + * @return the properties value + */ + public VCenterProperties properties() { + return this.properties; + } + + /** + * Set vCenter related data. + * + * @param properties the properties value to set + * @return the VCenterInner object itself. + */ + public VCenterInner withProperties(VCenterProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the VCenterInner object itself. + */ + public VCenterInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/VaultHealthDetailsImpl.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/VaultHealthDetailsImpl.java new file mode 100644 index 0000000000000..722a31fc3d478 --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/VaultHealthDetailsImpl.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.VaultHealthDetails; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.VaultHealthProperties; + +class VaultHealthDetailsImpl extends WrapperImpl implements VaultHealthDetails { + private final RecoveryServicesManager manager; + VaultHealthDetailsImpl(VaultHealthDetailsInner inner, RecoveryServicesManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public VaultHealthProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/VaultHealthDetailsInner.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/VaultHealthDetailsInner.java new file mode 100644 index 0000000000000..a2d46b3dfde7e --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/VaultHealthDetailsInner.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.recoveryservicessiterecovery.v2018_01_10.implementation; + +import com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.VaultHealthProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Vault health details definition. + */ +public class VaultHealthDetailsInner extends ProxyResource { + /** + * The vault health related data. + */ + @JsonProperty(value = "properties") + private VaultHealthProperties properties; + + /** + * Resource Location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get the vault health related data. + * + * @return the properties value + */ + public VaultHealthProperties properties() { + return this.properties; + } + + /** + * Set the vault health related data. + * + * @param properties the properties value to set + * @return the VaultHealthDetailsInner object itself. + */ + public VaultHealthDetailsInner withProperties(VaultHealthProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get resource Location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource Location. + * + * @param location the location value to set + * @return the VaultHealthDetailsInner object itself. + */ + public VaultHealthDetailsInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/package-info.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/package-info.java new file mode 100644 index 0000000000000..e145dddd80a4b --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/implementation/package-info.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights 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 SiteRecoveryManagementClient. + */ +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10.implementation; diff --git a/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/package-info.java b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/package-info.java new file mode 100644 index 0000000000000..1dda676e1a84a --- /dev/null +++ b/recoveryservicessiterecovery/resource-manager/v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservicessiterecovery/v2018_01_10/package-info.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights 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 SiteRecoveryManagementClient. + */ +package com.microsoft.azure.management.recoveryservicessiterecovery.v2018_01_10;